{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "bd8e3b95",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style> div#notebook {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " line-height: 170%;\n",
       " color: #cdd2e9;\n",
       " -webkit-font-smoothing: antialiased !important;\n",
       " padding-top: 25px !important;\n",
       "}\n",
       "body,\n",
       "div.body {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " color: #a2b0c7;\n",
       " background-color: #1a2028;\n",
       " background: #1a2028;\n",
       " -webkit-font-smoothing: antialiased !important;\n",
       "}\n",
       "body.notebook_app {\n",
       " padding: 0;\n",
       " background-color: #1a2028;\n",
       " background: #1a2028;\n",
       " padding-right: 0px !important;\n",
       " overflow-y: hidden;\n",
       "}\n",
       "a {\n",
       " font-family: sans-serif;\n",
       " color: #a2b0c7;\n",
       " -webkit-font-smoothing: antialiased !important;\n",
       "}\n",
       "a:hover,\n",
       "a:focus {\n",
       " color: #dbe1ea;\n",
       " -webkit-font-smoothing: antialiased !important;\n",
       "}\n",
       "div#maintoolbar {\n",
       " position: absolute;\n",
       " width: 90%;\n",
       " margin-left: -10%;\n",
       " padding-right: 8%;\n",
       " float: left;\n",
       " background: transparent !important;\n",
       "}\n",
       "#maintoolbar {\n",
       " margin-bottom: -3px;\n",
       " margin-top: 0px;\n",
       " border: 0px;\n",
       " min-height: 27px;\n",
       " padding-top: 2px;\n",
       " padding-bottom: 0px;\n",
       "}\n",
       "#maintoolbar .container {\n",
       " width: 75%;\n",
       " margin-right: auto;\n",
       " margin-left: auto;\n",
       "}\n",
       ".list_header,\n",
       "div#notebook_list_header.row.list_header {\n",
       " font-size: 14pt;\n",
       " color: #dbe1ea;\n",
       " background-color: transparent;\n",
       " height: 35px;\n",
       "}\n",
       "i.fa.fa-folder {\n",
       " display: inline-block;\n",
       " font: normal normal normal 14px \"FontAwesome\";\n",
       " font-family: \"FontAwesome\" !important;\n",
       " text-rendering: auto;\n",
       " -webkit-font-smoothing: antialiased;\n",
       " font-size: 18px;\n",
       " -moz-osx-font-smoothing: grayscale;\n",
       "}\n",
       "#running .panel-group .panel .panel-heading {\n",
       " font-size: 14pt;\n",
       " color: #a2b0c7;\n",
       " padding: 8px 8px;\n",
       " background: #252b35;\n",
       " background-color: #252b35;\n",
       "}\n",
       "#running .panel-group .panel .panel-heading a {\n",
       " font-size: 14pt;\n",
       " color: #a2b0c7;\n",
       "}\n",
       "#running .panel-group .panel .panel-heading a:focus,\n",
       "#running .panel-group .panel .panel-heading a:hover {\n",
       " font-size: 14pt;\n",
       " color: #a2b0c7;\n",
       "}\n",
       "#running .panel-group .panel .panel-body .list_container .list_item {\n",
       " background: #2d3846;\n",
       " background-color: #2d3846;\n",
       " padding: 2px;\n",
       " border-bottom: 2px solid rgba(75,95,118,.30);\n",
       "}\n",
       "#running .panel-group .panel .panel-body .list_container .list_item:hover {\n",
       " background: #2d3846;\n",
       " background-color: #2d3846;\n",
       "}\n",
       "#running .panel-group .panel .panel-body {\n",
       " padding: 2px;\n",
       "}\n",
       "button#refresh_running_list {\n",
       " border: none !important;\n",
       "}\n",
       "button#refresh_cluster_list {\n",
       " border: none !important;\n",
       "}\n",
       "div.running_list_info.toolbar_info {\n",
       " font-size: 15px;\n",
       " padding: 4px 0 4px 0;\n",
       " margin-top: 5px;\n",
       " margin-bottom: 8px;\n",
       " height: 24px;\n",
       " line-height: 24px;\n",
       " text-shadow: none;\n",
       "}\n",
       ".list_placeholder {\n",
       " font-weight: normal;\n",
       "}\n",
       "#tree-selector {\n",
       " padding: 0px;\n",
       " border-color: transparent;\n",
       "}\n",
       "#project_name > ul > li > a > i.fa.fa-home {\n",
       " color: #0b98c8;\n",
       " font-size: 17pt;\n",
       " display: inline-block;\n",
       " position: static;\n",
       " padding: 0px 0px;\n",
       " font-weight: normal;\n",
       " text-align: center;\n",
       " vertical-align: text-top;\n",
       "}\n",
       ".fa-folder:before {\n",
       " color: #4c8be2;\n",
       "}\n",
       ".fa-arrow-up:before {\n",
       " font-size: 14px;\n",
       "}\n",
       ".fa-arrow-down:before {\n",
       " font-size: 14px;\n",
       "}\n",
       "span#last-modified.btn.btn-xs.btn-default.sort-action:hover .fa,\n",
       "span#sort-name.btn.btn-xs.btn-default.sort-action:hover .fa {\n",
       " color: #009cd1;\n",
       "}\n",
       ".folder_icon:before {\n",
       " display: inline-block;\n",
       " font: normal normal normal 14px/1 FontAwesome;\n",
       " font-size: inherit;\n",
       " text-rendering: auto;\n",
       " -webkit-font-smoothing: antialiased;\n",
       " -moz-osx-font-smoothing: grayscale;\n",
       " content: \"\\f07b\";\n",
       " color: #4c8be2;\n",
       "}\n",
       ".notebook_icon:before {\n",
       " display: inline-block;\n",
       " font: normal normal normal 14px/1 FontAwesome;\n",
       " font-size: inherit;\n",
       " text-rendering: auto;\n",
       " -webkit-font-smoothing: antialiased;\n",
       " -moz-osx-font-smoothing: grayscale;\n",
       " content: \"\\f02d\";\n",
       " position: relative;\n",
       " color: #48a667 !important;\n",
       " top: 0px;\n",
       "}\n",
       ".file_icon:before {\n",
       " display: inline-block;\n",
       " font: normal normal normal 14px/1 FontAwesome;\n",
       " font-size: inherit;\n",
       " text-rendering: auto;\n",
       " -webkit-font-smoothing: antialiased;\n",
       " -moz-osx-font-smoothing: grayscale;\n",
       " content: \"\\f15b\";\n",
       " position: relative;\n",
       " top: 0px;\n",
       " color: #92a2bd !important;\n",
       "}\n",
       "#project_name a {\n",
       " display: inline-flex;\n",
       " padding-left: 7px;\n",
       " margin-left: -2px;\n",
       " text-align: -webkit-auto;\n",
       " vertical-align: baseline;\n",
       " font-size: 18px;\n",
       "}\n",
       "div#notebook_toolbar div.dynamic-instructions {\n",
       " font-family: sans-serif;\n",
       " font-size: 17px;\n",
       " color: #546386;\n",
       "}\n",
       "span#login_widget > .button,\n",
       "#logout {\n",
       " font-family: \"Proxima Nova\", sans-serif;\n",
       " color: #a2b0c7;\n",
       " background: transparent;\n",
       " background-color: transparent;\n",
       " border: 2px solid #252e3a;\n",
       " font-weight: normal;\n",
       " box-shadow: none;\n",
       " text-shadow: none;\n",
       " border-radius: 3px;\n",
       " margin-right: 10px;\n",
       " padding: 2px 7px;\n",
       "}\n",
       "span#login_widget > .button:hover,\n",
       "#logout:hover {\n",
       " color: #009cd1;\n",
       " background-color: transparent;\n",
       " background: transparent;\n",
       " border: 2px solid #009cd1;\n",
       " background-image: none;\n",
       " box-shadow: none !important;\n",
       " border-radius: 3px;\n",
       "}\n",
       "span#login_widget > .button:focus,\n",
       "#logout:focus,\n",
       "span#login_widget > .button.focus,\n",
       "#logout.focus,\n",
       "span#login_widget > .button:active,\n",
       "#logout:active,\n",
       "span#login_widget > .button.active,\n",
       "#logout.active,\n",
       ".open > .dropdown-togglespan#login_widget > .button,\n",
       ".open > .dropdown-toggle#logout {\n",
       " color: #fefefe;\n",
       " background-color: #a2b0c7;\n",
       " background: #a2b0c7;\n",
       " border-color: #a2b0c7;\n",
       " background-image: none;\n",
       " box-shadow: none !important;\n",
       " border-radius: 2px;\n",
       "}\n",
       "body > #header #header-container {\n",
       " padding-bottom: 0px;\n",
       " padding-top: 4px;\n",
       " box-sizing: border-box;\n",
       " -moz-box-sizing: border-box;\n",
       " -webkit-box-sizing: border-box;\n",
       "}\n",
       "body > #header {\n",
       " background: #1a2028;\n",
       " background-color: #1a2028;\n",
       " position: relative;\n",
       " z-index: 100;\n",
       "}\n",
       ".list_container {\n",
       " font-size: 13pt;\n",
       " color: #a2b0c7;\n",
       " border: none;\n",
       " text-shadow: none !important;\n",
       "}\n",
       ".list_container > div {\n",
       " border-bottom: 1px solid rgba(75,95,118,.30);\n",
       " font-size: 13pt;\n",
       "}\n",
       ".list_header > div,\n",
       ".list_item > div {\n",
       " padding-top: 6px;\n",
       " padding-bottom: 2px;\n",
       " padding-left: 0px;\n",
       "}\n",
       ".list_header > div .item_link,\n",
       ".list_item > div .item_link {\n",
       " margin-left: -1px;\n",
       " vertical-align: middle;\n",
       " line-height: 22px;\n",
       " font-size: 13pt;\n",
       "}\n",
       ".item_icon {\n",
       " color: #4c8be2;\n",
       " font-size: 13pt;\n",
       " vertical-align: middle;\n",
       "}\n",
       ".list_item input:not([type=\"checkbox\"]) {\n",
       " padding-right: 0px;\n",
       " height: 1.75em;\n",
       " width: 25%;\n",
       " margin: 0px 0 0;\n",
       " margin-top: 0px;\n",
       "}\n",
       ".list_header > div .item_link,\n",
       ".list_item > div .item_link {\n",
       " margin-left: -1px;\n",
       " vertical-align: middle;\n",
       " line-height: 1.5em;\n",
       " font-size: 12pt;\n",
       " display: inline-table;\n",
       " position: static;\n",
       "}\n",
       "#button-select-all {\n",
       " height: 34px;\n",
       " min-width: 55px;\n",
       " z-index: 0;\n",
       " border: none !important;\n",
       " padding-top: 0px;\n",
       " padding-bottom: 0px;\n",
       " margin-bottom: 0px;\n",
       " margin-top: 0px;\n",
       " left: -3px;\n",
       " border-radius: 0px !important;\n",
       "}\n",
       "#button-select-all:focus,\n",
       "#button-select-all:active:focus,\n",
       "#button-select-all.active:focus,\n",
       "#button-select-all.focus,\n",
       "#button-select-all:active.focus,\n",
       "#button-select-all.active.focus {\n",
       " background-color: #252e3a !important;\n",
       " background: #252e3a !important;\n",
       "}\n",
       "button#tree-selector-btn {\n",
       " height: 34px;\n",
       " font-size: 12.0pt;\n",
       " border: none;\n",
       " left: 0px;\n",
       " border-radius: 0px !important;\n",
       "}\n",
       "input#select-all.pull-left.tree-selector {\n",
       " margin-left: 7px;\n",
       " margin-right: 2px;\n",
       " margin-top: 2px;\n",
       " top: 4px;\n",
       "}\n",
       "input[type=\"radio\"],\n",
       "input[type=\"checkbox\"] {\n",
       " margin-top: 1px;\n",
       " line-height: normal;\n",
       "}\n",
       ".delete-button {\n",
       " border: none !important;\n",
       "}\n",
       "i.fa.fa-trash {\n",
       " font-size: 13.5pt;\n",
       "}\n",
       ".list_container a {\n",
       " font-size: 16px;\n",
       " color: #a2b0c7;\n",
       " border: none;\n",
       " text-shadow: none !important;\n",
       " font-weight: normal;\n",
       " font-style: normal;\n",
       "}\n",
       "div.list_container a:hover {\n",
       " color: #dbe1ea;\n",
       "}\n",
       ".list_header > div input,\n",
       ".list_item > div input {\n",
       " margin-right: 7px;\n",
       " margin-left: 12px;\n",
       " vertical-align: baseline;\n",
       " line-height: 22px;\n",
       " position: relative;\n",
       " top: -1px;\n",
       "}\n",
       "div.list_item:hover {\n",
       " background-color: rgba(75,95,118,.10);\n",
       "}\n",
       ".breadcrumb > li {\n",
       " font-size: 12.0pt;\n",
       " color: #a2b0c7;\n",
       " border: none;\n",
       " text-shadow: none !important;\n",
       "}\n",
       ".breadcrumb > li + li:before {\n",
       " content: \"/\\00a0\";\n",
       " padding: 0px;\n",
       " color: #a2b0c7;\n",
       " font-size: 18px;\n",
       "}\n",
       "#project_name > .breadcrumb {\n",
       " padding: 0px;\n",
       " margin-bottom: 0px;\n",
       " background-color: transparent;\n",
       " font-weight: normal;\n",
       " margin-top: -2px;\n",
       "}\n",
       "ul#tabs a {\n",
       " font-family: sans-serif;\n",
       " font-size: 13.5pt;\n",
       " font-weight: normal;\n",
       " font-style: normal;\n",
       " text-shadow: none !important;\n",
       "}\n",
       ".nav-tabs {\n",
       " font-family: sans-serif;\n",
       " font-size: 13.5pt;\n",
       " font-weight: normal;\n",
       " font-style: normal;\n",
       " background-color: transparent;\n",
       " border-color: transparent;\n",
       " text-shadow: none !important;\n",
       " border: 2px solid transparent;\n",
       "}\n",
       ".nav-tabs > li > a:active,\n",
       ".nav-tabs > li > a:focus,\n",
       ".nav-tabs > li > a:hover,\n",
       ".nav-tabs > li.active > a,\n",
       ".nav-tabs > li.active > a:focus,\n",
       ".nav-tabs > li.active > a:hover,\n",
       ".nav-tabs > li.active > a,\n",
       ".nav-tabs > li.active > a:hover,\n",
       ".nav-tabs > li.active > a:focus {\n",
       " color: #009cd1;\n",
       " background-color: transparent;\n",
       " border-color: transparent;\n",
       " border-bottom: 2px solid transparent;\n",
       "}\n",
       ".nav > li.disabled > a,\n",
       ".nav > li.disabled > a:hover {\n",
       " color: #546386;\n",
       "}\n",
       ".nav-tabs > li > a:before {\n",
       " content: \"\";\n",
       " position: absolute;\n",
       " width: 100%;\n",
       " height: 2px;\n",
       " bottom: -2px;\n",
       " left: 0;\n",
       " background-color: #009cd1;\n",
       " visibility: hidden;\n",
       " -webkit-transform: perspective(0)scaleX(0);\n",
       " transform: perspective(0)scaleX(0);\n",
       " -webkit-transition: ease 220ms;\n",
       " transition: ease 220ms;\n",
       " -webkit-font-smoothing: antialiased !important;\n",
       "}\n",
       ".nav-tabs > li > a:hover:before {\n",
       " visibility: visible;\n",
       " -webkit-transform: perspective(1)scaleX(1);\n",
       " transform: perspective(1)scaleX(1);\n",
       "}\n",
       ".nav-tabs > li.active > a:before {\n",
       " content: \"\";\n",
       " position: absolute;\n",
       " width: 100%;\n",
       " height: 2px;\n",
       " bottom: -2px;\n",
       " left: 0;\n",
       " background-color: #009cd1;\n",
       " visibility: visible;\n",
       " -webkit-transform: perspective(1)scaleX(1);\n",
       " transform: perspective(1)scaleX(1);\n",
       " -webkit-font-smoothing: subpixel-antialiased !important;\n",
       "}\n",
       "div#notebook {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " padding-top: 4px;\n",
       "}\n",
       ".notebook_app {\n",
       " background-color: #1a2028;\n",
       "}\n",
       "#notebook-container {\n",
       " padding: 13px 2px;\n",
       " background-color: #1a2028;\n",
       " min-height: 0px;\n",
       " box-shadow: none;\n",
       " width: 980px;\n",
       " margin-right: auto;\n",
       " margin-left: auto;\n",
       "}\n",
       "div#ipython-main-app.container {\n",
       " width: 980px;\n",
       " margin-right: auto;\n",
       " margin-left: auto;\n",
       " margin-right: auto;\n",
       " margin-left: auto;\n",
       "}\n",
       ".container {\n",
       " width: 980px;\n",
       " margin-right: auto;\n",
       " margin-left: auto;\n",
       "}\n",
       "div#menubar-container {\n",
       " width: 100%;\n",
       " width: 980px;\n",
       "}\n",
       "div#header-container {\n",
       " width: 980px;\n",
       "}\n",
       ".notebook_app #header,\n",
       ".edit_app #header {\n",
       " box-shadow: none !important;\n",
       " background-color: #1a2028;\n",
       " border-bottom: 2px solid rgba(75,95,118,.30);\n",
       "}\n",
       "#header,\n",
       ".edit_app #header {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " box-shadow: none;\n",
       " background-color: #1a2028;\n",
       "}\n",
       "#header .header-bar,\n",
       ".edit_app #header .header-bar {\n",
       " background: #1a2028;\n",
       " background-color: #1a2028;\n",
       "}\n",
       "body > #header .header-bar {\n",
       " width: 100%;\n",
       " background: #1a2028;\n",
       "}\n",
       "span.checkpoint_status,\n",
       "span.autosave_status {\n",
       " font-size: small;\n",
       " display: none;\n",
       "}\n",
       "#menubar,\n",
       "div#menubar {\n",
       " background-color: #1a2028;\n",
       " padding-top: 0px !important;\n",
       "}\n",
       "#menubar .navbar,\n",
       ".navbar-default {\n",
       " background-color: #1a2028;\n",
       " margin-bottom: 0px;\n",
       " margin-top: 0px;\n",
       "}\n",
       ".navbar {\n",
       " border: none;\n",
       "}\n",
       "div.navbar-text,\n",
       ".navbar-text,\n",
       ".navbar-text.indicator_area,\n",
       "p.navbar-text.indicator_area {\n",
       " margin-top: 8px !important;\n",
       " margin-bottom: 0px;\n",
       " color: #0b98c8;\n",
       "}\n",
       ".navbar-default {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " background-color: #1a2028;\n",
       " border-color: #323b48;\n",
       " line-height: 1.5em;\n",
       " padding-bottom: 0px;\n",
       "}\n",
       ".navbar-default .navbar-nav > li > a {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " color: #a2b0c7;\n",
       " display: block;\n",
       " line-height: 1.5em;\n",
       " padding-top: 14px;\n",
       " padding-bottom: 11px;\n",
       "}\n",
       ".navbar-default .navbar-nav > li > a:hover,\n",
       ".navbar-default .navbar-nav > li > a:focus {\n",
       " color: #dbe1ea !important;\n",
       " background-color: rgba(75,95,118,.30) !important;\n",
       " border-color: #323b48 !important;\n",
       " line-height: 1.5em;\n",
       " transition: 80ms ease;\n",
       "}\n",
       ".navbar-default .navbar-nav > .open > a,\n",
       ".navbar-default .navbar-nav > .open > a:hover,\n",
       ".navbar-default .navbar-nav > .open > a:focus {\n",
       " color: #fefefe;\n",
       " background-color: #36404e;\n",
       " border-color: #36404e;\n",
       " line-height: 1.5em;\n",
       "}\n",
       ".navbar-nav > li > .dropdown-menu {\n",
       " margin-top: 0px;\n",
       "}\n",
       ".navbar-nav {\n",
       " margin: 0;\n",
       "}\n",
       "div.notification_widget.info,\n",
       ".notification_widget.info,\n",
       ".notification_widget:active:hover,\n",
       ".notification_widget.active:hover,\n",
       ".open > .dropdown-toggle.notification_widget:hover,\n",
       ".notification_widget:active:focus,\n",
       ".notification_widget.active:focus,\n",
       ".open > .dropdown-toggle.notification_widget:focus,\n",
       ".notification_widget:active.focus,\n",
       ".notification_widget.active.focus,\n",
       ".open > .dropdown-toggle.notification_widget.focus,\n",
       "div#notification_notebook.notification_widget.btn.btn-xs.navbar-btn,\n",
       "div#notification_notebook.notification_widget.btn.btn-xs.navbar-btn:hover,\n",
       "div#notification_notebook.notification_widget.btn.btn-xs.navbar-btn:focus {\n",
       " color: #899ab8 !important;\n",
       " background-color: transparent !important;\n",
       " border-color: transparent !important;\n",
       " padding-bottom: 0px !important;\n",
       " margin-bottom: 0px !important;\n",
       " font-size: 9pt !important;\n",
       " z-index: 0;\n",
       "}\n",
       "div#notification_notebook.notification_widget.btn.btn-xs.navbar-btn {\n",
       " font-size: 9pt !important;\n",
       " z-index: 0;\n",
       "}\n",
       ".notification_widget {\n",
       " color: #4c8be2;\n",
       " z-index: -500;\n",
       " font-size: 9pt;\n",
       " background: transparent;\n",
       " background-color: transparent;\n",
       " margin-right: 3px;\n",
       " border: none;\n",
       "}\n",
       ".notification_widget,\n",
       "div.notification_widget {\n",
       " margin-right: 0px;\n",
       " margin-left: 0px;\n",
       " padding-right: 0px;\n",
       " vertical-align: text-top !important;\n",
       " margin-top: 6px !important;\n",
       " background: transparent !important;\n",
       " background-color: transparent !important;\n",
       " font-size: 9pt !important;\n",
       " border: none;\n",
       "}\n",
       ".navbar-btn.btn-xs:hover {\n",
       " border: none !important;\n",
       " background: transparent !important;\n",
       " background-color: transparent !important;\n",
       " color: #a2b0c7 !important;\n",
       "}\n",
       "div.notification_widget.info,\n",
       ".notification_widget.info {\n",
       " display: none !important;\n",
       "}\n",
       ".edit_mode .modal_indicator:before {\n",
       " display: none;\n",
       "}\n",
       ".command_mode .modal_indicator:before {\n",
       " display: none;\n",
       "}\n",
       ".item_icon {\n",
       " color: #4c8be2;\n",
       "}\n",
       ".item_buttons .kernel-name {\n",
       " font-size: 13pt;\n",
       " color: #4c8be2;\n",
       "}\n",
       ".running_notebook_icon:before {\n",
       " color: #48a667 !important;\n",
       " font: normal normal normal 15px/1 FontAwesome;\n",
       " font-size: 15px;\n",
       " text-rendering: auto;\n",
       " -webkit-font-smoothing: antialiased;\n",
       " -moz-osx-font-smoothing: grayscale;\n",
       " content: \"\\f10c\";\n",
       " vertical-align: middle;\n",
       " position: static;\n",
       " display: inherit;\n",
       "}\n",
       ".item_buttons .running-indicator {\n",
       " padding-top: 4px;\n",
       " color: #48a667;\n",
       " font-family: sans-serif;\n",
       " text-rendering: auto;\n",
       " -webkit-font-smoothing: antialiased;\n",
       "}\n",
       "#notification_trusted {\n",
       " font-family: sans-serif;\n",
       " border: none;\n",
       " background: transparent;\n",
       " background-color: transparent;\n",
       " margin-bottom: 0px !important;\n",
       " vertical-align: bottom !important;\n",
       " color: #546386 !important;\n",
       " cursor: default !important;\n",
       "}\n",
       "#notification_area,\n",
       "div.notification_area {\n",
       " float: right !important;\n",
       " position: static;\n",
       " cursor: pointer;\n",
       " padding-top: 6px;\n",
       " padding-right: 4px;\n",
       "}\n",
       "div#notification_notebook.notification_widget.btn.btn-xs.navbar-btn {\n",
       " font-size: 9pt !important;\n",
       " z-index: 0;\n",
       " margin-top: -5px !important;\n",
       "}\n",
       "#modal_indicator {\n",
       " float: right !important;\n",
       " color: #4c8be2;\n",
       " background: #1a2028;\n",
       " background-color: #1a2028;\n",
       " margin-top: 8px !important;\n",
       " margin-left: 0px;\n",
       "}\n",
       "#kernel_indicator {\n",
       " float: right !important;\n",
       " color: #0b98c8;\n",
       " background: #1a2028;\n",
       " background-color: #1a2028;\n",
       " border-left: 2px solid #0b98c8;\n",
       " padding-top: 0px;\n",
       " padding-bottom: 4px;\n",
       " margin-top: 10px !important;\n",
       " margin-left: -2px;\n",
       " padding-left: 5px !important;\n",
       "}\n",
       "#kernel_indicator .kernel_indicator_name {\n",
       " font-size: 17px;\n",
       " color: #0b98c8;\n",
       " background: #1a2028;\n",
       " background-color: #1a2028;\n",
       " padding-left: 5px;\n",
       " padding-right: 5px;\n",
       " margin-top: 4px;\n",
       " vertical-align: text-top;\n",
       " padding-bottom: 0px;\n",
       "}\n",
       ".kernel_idle_icon:before {\n",
       " display: inline-block;\n",
       " font: normal normal normal 22px/1 FontAwesome;\n",
       " font-size: 22px;\n",
       " text-rendering: auto;\n",
       " -webkit-font-smoothing: antialiased;\n",
       " cursor: pointer;\n",
       " margin-left: 0px !important;\n",
       " opacity: 0.7;\n",
       " vertical-align: bottom;\n",
       " margin-top: 1px;\n",
       " content: \"\\f1db\";\n",
       "}\n",
       ".kernel_busy_icon:before {\n",
       " display: inline-block;\n",
       " font: normal normal normal 22px/1 FontAwesome;\n",
       " font-size: 22px;\n",
       " -webkit-animation: pulsate 2s infinite ease-out;\n",
       " animation: pulsate 2s infinite ease-out;\n",
       " text-rendering: auto;\n",
       " -webkit-font-smoothing: antialiased;\n",
       " cursor: pointer;\n",
       " margin-left: 0px !important;\n",
       " vertical-align: bottom;\n",
       " margin-top: 1px;\n",
       " content: \"\\f111\";\n",
       "}\n",
       "@-webkit-keyframes pulsate {\n",
       " 0% {\n",
       "  -webkit-transform: scale(1.0,1.0);\n",
       "  opacity: 0.8;\n",
       " }\n",
       " 8% {\n",
       "  -webkit-transform: scale(1.0,1.0);\n",
       "  opacity: 0.8;\n",
       " }\n",
       " 50% {\n",
       "  -webkit-transform: scale(0.75,0.75);\n",
       "  opacity: 0.3;\n",
       " }\n",
       " 92% {\n",
       "  -webkit-transform: scale(1.0,1.0);\n",
       "  opacity: 0.8;\n",
       " }\n",
       " 100% {\n",
       "  -webkit-transform: scale(1.0,1.0);\n",
       "  opacity: 0.8;\n",
       " }\n",
       "}\n",
       "div.notification_widget.info,\n",
       ".notification_widget.info,\n",
       ".notification_widget:active:hover,\n",
       ".notification_widget.active:hover,\n",
       ".open > .dropdown-toggle.notification_widget:hover,\n",
       ".notification_widget:active:focus,\n",
       ".notification_widget.active:focus,\n",
       ".open > .dropdown-toggle.notification_widget:focus,\n",
       ".notification_widget:active.focus,\n",
       ".notification_widget.active.focus,\n",
       ".open > .dropdown-toggle.notification_widget.focus,\n",
       "div#notification_notebook.notification_widget.btn.btn-xs.navbar-btn,\n",
       "div#notification_notebook.notification_widget.btn.btn-xs.navbar-btn:hover,\n",
       "div#notification_notebook.notification_widget.btn.btn-xs.navbar-btn:focus {\n",
       " color: #899ab8;\n",
       " background-color: #1a2028;\n",
       " border-color: #1a2028;\n",
       "}\n",
       "#notification_area,\n",
       "div.notification_area {\n",
       " float: right !important;\n",
       " position: static;\n",
       "}\n",
       ".notification_widget,\n",
       "div.notification_widget {\n",
       " margin-right: 0px;\n",
       " margin-left: 0px;\n",
       " padding-right: 0px;\n",
       " vertical-align: text-top !important;\n",
       " margin-top: 6px !important;\n",
       " z-index: 1000;\n",
       "}\n",
       "#kernel_logo_widget,\n",
       "#kernel_logo_widget .current_kernel_logo {\n",
       " display: none;\n",
       "}\n",
       "div#ipython_notebook {\n",
       " display: none;\n",
       "}\n",
       "i.fa.fa-icon {\n",
       " -webkit-font-smoothing: antialiased;\n",
       " -moz-osx-font-smoothing: grayscale;\n",
       " text-rendering: auto;\n",
       "}\n",
       ".fa {\n",
       " display: inline-block;\n",
       " font: normal normal normal 10pt/1 \"FontAwesome\", sans-serif;\n",
       " text-rendering: auto;\n",
       " -webkit-font-smoothing: antialiased;\n",
       " -moz-osx-font-smoothing: grayscale;\n",
       "}\n",
       ".dropdown-menu {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " box-shadow: none;\n",
       " padding: 0px;\n",
       " text-align: left;\n",
       " border: none;\n",
       " background-color: #36404e;\n",
       " background: #36404e;\n",
       " line-height: 1;\n",
       "}\n",
       ".dropdown-menu:hover {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " box-shadow: none;\n",
       " padding: 0px;\n",
       " text-align: left;\n",
       " border: none;\n",
       " background-color: #36404e;\n",
       " box-shadow: none;\n",
       " line-height: 1;\n",
       "}\n",
       ".dropdown-menu > li > a {\n",
       " font-family: sans-serif;\n",
       " font-size: 12.0pt;\n",
       " display: block;\n",
       " padding: 10px 20px 9px 10px;\n",
       " color: #a2b0c7;\n",
       " background-color: #36404e;\n",
       " background: #36404e;\n",
       "}\n",
       ".dropdown-menu > li > a:hover,\n",
       ".dropdown-menu > li > a:focus {\n",
       " color: #dbe1ea;\n",
       " background-color: #323b48;\n",
       " background: #323b48;\n",
       " border-color: #323b48;\n",
       " transition: 200ms ease;\n",
       "}\n",
       ".dropdown-menu .divider {\n",
       " height: 1px;\n",
       " margin: 0px 0px;\n",
       " overflow: hidden;\n",
       " background-color: rgba(75,95,118,.55);\n",
       "}\n",
       ".dropdown-submenu > .dropdown-menu {\n",
       " display: none;\n",
       " top: 2px !important;\n",
       " left: 100%;\n",
       " margin-top: -2px;\n",
       " margin-left: 0px;\n",
       " padding-top: 0px;\n",
       " transition: 200ms ease;\n",
       "}\n",
       ".dropdown-menu > .disabled > a,\n",
       ".dropdown-menu > .disabled > a:hover,\n",
       ".dropdown-menu > .disabled > a:focus {\n",
       " font-family: sans-serif;\n",
       " font-size: 12.0pt;\n",
       " font-weight: normal;\n",
       " color: #546386;\n",
       " padding: none;\n",
       " display: block;\n",
       " clear: both;\n",
       " white-space: nowrap;\n",
       "}\n",
       ".dropdown-submenu > a:after {\n",
       " color: #a2b0c7;\n",
       " margin-right: -16px;\n",
       " margin-top: 0px;\n",
       " display: inline-block;\n",
       "}\n",
       ".dropdown-submenu:hover > a:after,\n",
       ".dropdown-submenu:active > a:after,\n",
       ".dropdown-submenu:focus > a:after,\n",
       ".dropdown-submenu:visited > a:after {\n",
       " color: #0b98c8;\n",
       " margin-right: -16px;\n",
       " display: inline-block !important;\n",
       "}\n",
       "div.kse-dropdown > .dropdown-menu,\n",
       ".kse-dropdown > .dropdown-menu {\n",
       " min-width: 0;\n",
       " top: 94%;\n",
       "}\n",
       ".btn,\n",
       ".btn-default {\n",
       " font-family: sans-serif;\n",
       " color: #a2b0c7;\n",
       " background: #252e3a;\n",
       " background-color: #252e3a;\n",
       " border: 2px solid #252e3a;\n",
       " font-weight: normal;\n",
       " box-shadow: none;\n",
       " text-shadow: none;\n",
       " border-radius: 3px;\n",
       " font-size: initial;\n",
       "}\n",
       ".btn:hover,\n",
       ".btn:active:hover,\n",
       ".btn.active:hover,\n",
       ".btn-default:hover,\n",
       ".open > .dropdown-toggle.btn-default:hover,\n",
       ".open > .dropdown-toggle.btn:hover {\n",
       " color: #009cd1;\n",
       " border: 2px solid #293340;\n",
       " background-color: #293340;\n",
       " background: #293340;\n",
       " background-image: none;\n",
       " box-shadow: none !important;\n",
       " border-radius: 3px;\n",
       "}\n",
       ".btn:active,\n",
       ".btn.active,\n",
       ".btn:active:focus,\n",
       ".btn.active:focus,\n",
       ".btn:active.focus,\n",
       ".btn.active.focus,\n",
       ".btn-default:focus,\n",
       ".btn-default.focus,\n",
       ".btn-default:active,\n",
       ".btn-default.active,\n",
       ".btn-default:active:hover,\n",
       ".btn-default.active:hover,\n",
       ".btn-default:active:focus,\n",
       ".btn-default.active:focus,\n",
       ".btn-default:active.focus,\n",
       ".btn-default.active.focus,\n",
       ".open > .dropdown-toggle.btn:focus,\n",
       ".open > .dropdown-toggle.btn.focus,\n",
       ".open > .dropdown-toggle.btn-default:hover,\n",
       ".open > .dropdown-toggle.btn-default:focus,\n",
       ".open > .dropdown-toggle.btn-default.hover,\n",
       ".open > .dropdown-toggle.btn-default.focus {\n",
       " color: #009cd1;\n",
       " border: 2px solid #293340;\n",
       " background-color: #293340 !important;\n",
       " background: #293340 !important;\n",
       " background-image: none;\n",
       " box-shadow: none !important;\n",
       " border-radius: 3px;\n",
       "}\n",
       ".btn-default:active:hover,\n",
       ".btn-default.active:hover,\n",
       ".btn-default:active:focus,\n",
       ".btn-default.active:focus,\n",
       ".btn-default:active.focus,\n",
       ".btn-default.active.focus {\n",
       " color: #009cd1 !important;\n",
       " background-color: #252e3a;\n",
       " border-color: #33517c !important;\n",
       " transition: 2000ms ease;\n",
       "}\n",
       ".btn:focus,\n",
       ".btn.focus,\n",
       ".btn:active:focus,\n",
       ".btn.active:focus,\n",
       ".btn:active,\n",
       ".btn.active,\n",
       ".btn:active.focus,\n",
       ".btn.active.focus {\n",
       " color: #009cd1 !important;\n",
       " outline: none !important;\n",
       " outline-width: 0px !important;\n",
       " background: #33517c !important;\n",
       " background-color: #33517c !important;\n",
       " border-color: #33517c !important;\n",
       " transition: 200ms ease !important;\n",
       "}\n",
       ".item_buttons > .btn,\n",
       ".item_buttons > .btn-group,\n",
       ".item_buttons > .input-group {\n",
       " font-size: 13pt;\n",
       " background: transparent;\n",
       " background-color: transparent;\n",
       " border: 0px solid #252b35;\n",
       " border-bottom: 2px solid transparent;\n",
       " margin-left: 5px;\n",
       " padding-top: 4px !important;\n",
       "}\n",
       ".item_buttons > .btn:hover,\n",
       ".item_buttons > .btn-group:hover,\n",
       ".item_buttons > .input-group:hover,\n",
       ".item_buttons > .btn.active,\n",
       ".item_buttons > .btn-group.active,\n",
       ".item_buttons > .input-group.active,\n",
       ".item_buttons > .btn.focus {\n",
       " margin-left: 5px;\n",
       " background: #21262f;\n",
       " padding-top: 4px !important;\n",
       " background-color: transparent;\n",
       " border: 0px solid transparent;\n",
       " border-bottom: 2px solid #0b98c8;\n",
       " border-radius: 0px;\n",
       " transition: none;\n",
       "}\n",
       ".item_buttons {\n",
       " line-height: 1.5em !important;\n",
       "}\n",
       ".item_buttons .btn {\n",
       " min-width: 11ex;\n",
       "}\n",
       ".btn-group > .btn:first-child {\n",
       " margin-left: 3px;\n",
       "}\n",
       ".btn-group > .btn-mini,\n",
       ".btn-sm,\n",
       ".btn-group-sm > .btn,\n",
       ".btn-xs,\n",
       ".btn-group-xs > .btn,\n",
       ".alternate_upload .btn-upload,\n",
       ".btn-group,\n",
       ".btn-group-vertical {\n",
       " font-size: inherit;\n",
       " font-weight: normal;\n",
       " height: inherit;\n",
       " line-height: inherit;\n",
       "}\n",
       ".btn-xs,\n",
       ".btn-group-xs > .btn {\n",
       " font-size: initial !important;\n",
       " background-image: none;\n",
       " font-weight: normal;\n",
       " text-shadow: none;\n",
       " display: inline-table;\n",
       " padding: 2px 5px;\n",
       " line-height: 1.45;\n",
       "}\n",
       ".btn-group > .btn:first-child {\n",
       " margin-left: 3px;\n",
       "}\n",
       "div#new-buttons > button,\n",
       "#new-buttons > button,\n",
       "div#refresh_notebook_list,\n",
       "#refresh_notebook_list {\n",
       " background: transparent;\n",
       " background-color: transparent;\n",
       " border: none;\n",
       "}\n",
       "div#new-buttons > button:hover,\n",
       "#new-buttons > button:hover,\n",
       "div#refresh_notebook_list,\n",
       "#refresh_notebook_list,\n",
       "div.alternate_upload .btn-upload,\n",
       ".alternate_upload .btn-upload,\n",
       "div.dynamic-buttons > button,\n",
       ".dynamic-buttons > button,\n",
       ".dynamic-buttons > button:focus,\n",
       ".dynamic-buttons > button:active:focus,\n",
       ".dynamic-buttons > button.active:focus,\n",
       ".dynamic-buttons > button.focus,\n",
       ".dynamic-buttons > button:active.focus,\n",
       ".dynamic-buttons > button.active.focus,\n",
       "#new-buttons > button:focus,\n",
       "#new-buttons > button:active:focus,\n",
       "#new-buttons > button.active:focus,\n",
       "#new-buttons > button.focus,\n",
       "#new-buttons > button:active.focus,\n",
       "#new-buttons > button.active.focus,\n",
       ".alternate_upload .btn-upload:focus,\n",
       ".alternate_upload .btn-upload:active:focus,\n",
       ".alternate_upload .btn-upload.active:focus,\n",
       ".alternate_upload .btn-upload.focus,\n",
       ".alternate_upload .btn-upload:active.focus,\n",
       ".alternate_upload .btn-upload.active.focus {\n",
       " background: transparent !important;\n",
       " background-color: transparent !important;\n",
       " border: none !important;\n",
       "}\n",
       ".alternate_upload input.fileinput {\n",
       " text-align: center;\n",
       " vertical-align: bottom;\n",
       " margin-left: -.5ex;\n",
       " display: inline-table;\n",
       " border: solid 0px #252e3a;\n",
       " margin-bottom: -1ex;\n",
       "}\n",
       ".alternate_upload .btn-upload {\n",
       " display: inline-table;\n",
       " background: transparent;\n",
       " border: none;\n",
       "}\n",
       ".btn-group .btn + .btn,\n",
       ".btn-group .btn + .btn-group,\n",
       ".btn-group .btn-group + .btn,\n",
       ".btn-group .btn-group + .btn-group {\n",
       " margin-left: -2px;\n",
       "}\n",
       ".btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n",
       " border-bottom-right-radius: 0;\n",
       " border-top-right-radius: 0;\n",
       " z-index: 2;\n",
       "}\n",
       ".dropdown-header {\n",
       " font-family: sans-serif !important;\n",
       " font-size: 13pt !important;\n",
       " color: #0b98c8 !important;\n",
       " border-bottom: none !important;\n",
       " padding: 0px !important;\n",
       " margin: 6px 6px 0px !important;\n",
       "}\n",
       "span#last-modified.btn.btn-xs.btn-default.sort-action,\n",
       "span#sort-name.btn.btn-xs.btn-default.sort-action,\n",
       "span#file-size.btn.btn-xs.btn-default.sort-action {\n",
       " font-family: sans-serif;\n",
       " font-size: 16px;\n",
       " background-color: transparent;\n",
       " background: transparent;\n",
       " border: none;\n",
       " color: #a2b0c7;\n",
       " padding-bottom: 0px;\n",
       " margin-bottom: 0px;\n",
       " vertical-align: sub;\n",
       "}\n",
       "span#last-modified.btn.btn-xs.btn-default.sort-action {\n",
       " margin-left: 19px;\n",
       "}\n",
       "button.close {\n",
       " border: 0px none;\n",
       " font-family: sans-serif;\n",
       " font-size: 20pt;\n",
       " font-weight: normal;\n",
       "}\n",
       ".dynamic-buttons {\n",
       " padding-top: 0px;\n",
       " display: inline-block;\n",
       "}\n",
       ".close {\n",
       " color: #dc6972;\n",
       " opacity: .5;\n",
       " text-shadow: none;\n",
       " font-weight: normal;\n",
       "}\n",
       ".close:hover {\n",
       " color: #dc6972;\n",
       " opacity: 1;\n",
       " font-weight: normal;\n",
       "}\n",
       "div.nbext-enable-btns .btn[disabled],\n",
       "div.nbext-enable-btns .btn[disabled]:hover,\n",
       ".btn-default.disabled,\n",
       ".btn-default[disabled],\n",
       ".btn-default.disabled:hover,\n",
       ".btn-default[disabled]:hover,\n",
       "fieldset[disabled] .btn-default:hover,\n",
       ".btn-default.disabled:focus,\n",
       ".btn-default[disabled]:focus,\n",
       "fieldset[disabled] .btn-default:focus,\n",
       ".btn-default.disabled.focus,\n",
       ".btn-default[disabled].focus,\n",
       "fieldset[disabled] .btn-default.focus {\n",
       " color: #92a2bd;\n",
       " background: #232c37;\n",
       " background-color: #232c37;\n",
       " border-color: #232c37;\n",
       " transition: 200ms ease;\n",
       "}\n",
       ".input-group-addon {\n",
       " padding: 2px 5px;\n",
       " font-size: 13pt;\n",
       " font-weight: normal;\n",
       " height: auto;\n",
       " color: #a2b0c7;\n",
       " text-align: center;\n",
       " background-color: transparent;\n",
       " border: 2px solid transparent !important;\n",
       " text-transform: capitalize;\n",
       "}\n",
       "a.btn.btn-default.input-group-addon:hover {\n",
       " background: transparent !important;\n",
       " background-color: transparent !important;\n",
       "}\n",
       ".btn-group > .btn + .dropdown-toggle {\n",
       " padding-left: 8px;\n",
       " padding-right: 8px;\n",
       " height: 100%;\n",
       "}\n",
       ".btn-group > .btn + .dropdown-toggle:hover {\n",
       " background: #293340 !important;\n",
       "}\n",
       ".input-group-btn {\n",
       " position: relative;\n",
       " font-size: inherit;\n",
       " white-space: nowrap;\n",
       " background: #252b35;\n",
       " background-color: #252b35;\n",
       " border: none;\n",
       "}\n",
       ".input-group-btn:hover {\n",
       " background: #21262f;\n",
       " background-color: #21262f;\n",
       " border: none;\n",
       "}\n",
       ".input-group-btn:first-child > .btn,\n",
       ".input-group-btn:first-child > .btn-group {\n",
       " background: #252b35;\n",
       " background-color: #252b35;\n",
       " border: none;\n",
       " margin-left: 2px;\n",
       " margin-right: -1px;\n",
       " font-size: inherit;\n",
       "}\n",
       ".input-group-btn:first-child > .btn:hover,\n",
       ".input-group-btn:first-child > .btn-group:hover {\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       " border: none;\n",
       " font-size: inherit;\n",
       " transition: 200ms ease;\n",
       "}\n",
       "div.modal .btn-group > .btn:first-child {\n",
       " background: #252b35;\n",
       " background-color: #252b35;\n",
       " border: 1px solid #232932;\n",
       " margin-top: 0px !important;\n",
       " margin-left: 0px;\n",
       " margin-bottom: 2px;\n",
       "}\n",
       "div.modal .btn-group > .btn:first-child:hover {\n",
       " background: #21262f;\n",
       " background-color: #21262f;\n",
       " border: 1px solid #21262f;\n",
       " transition: 200ms ease;\n",
       "}\n",
       "div.modal > button,\n",
       "div.modal-footer > button {\n",
       " background: #252b35;\n",
       " background-color: #252b35;\n",
       " border-color: #252b35;\n",
       "}\n",
       "div.modal > button:hover,\n",
       "div.modal-footer > button:hover {\n",
       " background: #21262f;\n",
       " background-color: #21262f;\n",
       " border-color: #21262f;\n",
       " transition: 200ms ease;\n",
       "}\n",
       ".modal-content {\n",
       " font-family: sans-serif;\n",
       " font-size: 12.0pt;\n",
       " position: relative;\n",
       " background: #252b35;\n",
       " background-color: #252b35;\n",
       " border: none;\n",
       " border-radius: 1px;\n",
       " background-clip: padding-box;\n",
       " outline: none;\n",
       "}\n",
       ".modal-header {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " color: #a2b0c7;\n",
       " background: #252b35;\n",
       " background-color: #252b35;\n",
       " border-color: rgba(75,95,118,.30);\n",
       " padding: 12px;\n",
       " min-height: 16.4286px;\n",
       "}\n",
       ".modal-content h4 {\n",
       " font-family: sans-serif;\n",
       " font-size: 16pt;\n",
       " color: #a2b0c7;\n",
       " padding: 5px;\n",
       "}\n",
       ".modal-body {\n",
       " background-color: #2d3846;\n",
       " position: relative;\n",
       " padding: 15px;\n",
       "}\n",
       ".modal-footer {\n",
       " padding: 8px;\n",
       " text-align: right;\n",
       " background-color: #2d3846;\n",
       " border-top: none;\n",
       "}\n",
       ".alert-info {\n",
       " background-color: #323f50;\n",
       " border-color: rgba(75,95,118,.30);\n",
       " color: #a2b0c7;\n",
       "}\n",
       ".modal-header .close {\n",
       " margin-top: -5px;\n",
       " font-size: 25pt;\n",
       "}\n",
       ".modal-backdrop,\n",
       ".modal-backdrop.in {\n",
       " opacity: 0.85;\n",
       " background-color: notebook-bg;\n",
       "}\n",
       "div.panel,\n",
       "div.panel-default,\n",
       ".panel,\n",
       ".panel-default {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " background-color: #2d3846;\n",
       " color: #a2b0c7;\n",
       " margin-bottom: 14px;\n",
       " border: 0;\n",
       " box-shadow: none;\n",
       "}\n",
       "div.panel > .panel-heading,\n",
       "div.panel-default > .panel-heading {\n",
       " font-size: 14pt;\n",
       " color: #a2b0c7;\n",
       " background: #252b35;\n",
       " background-color: #252b35;\n",
       " border: 0;\n",
       "}\n",
       ".modal .modal-dialog {\n",
       " min-width: 950px;\n",
       " margin: 50px auto;\n",
       "}\n",
       "div.container-fluid {\n",
       " margin-right: auto;\n",
       " margin-left: auto;\n",
       " padding-left: 0px;\n",
       " padding-right: 5px;\n",
       "}\n",
       "div.form-control,\n",
       ".form-control {\n",
       " font-family: sans-serif;\n",
       " font-size: initial;\n",
       " color: #a2b0c7;\n",
       " background-color: #252b35;\n",
       " border: 1px solid #252e3a !important;\n",
       " margin-left: 2px;\n",
       " box-shadow: none;\n",
       " transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;\n",
       "}\n",
       ".form-control-static {\n",
       " min-height: inherit;\n",
       " height: inherit;\n",
       "}\n",
       ".form-group.list-group-item {\n",
       " color: #a2b0c7;\n",
       " background-color: #2d3846;\n",
       " border-color: rgba(75,95,118,.30);\n",
       " margin-bottom: 0px;\n",
       "}\n",
       ".form-group .input-group {\n",
       " float: left;\n",
       "}\n",
       "input,\n",
       "button,\n",
       "select,\n",
       "textarea {\n",
       " background-color: #252b35;\n",
       " font-weight: normal;\n",
       " border: 1px solid rgba(75,95,118,.30);\n",
       "}\n",
       "select.form-control.select-xs {\n",
       " height: 33px;\n",
       " font-size: 13pt;\n",
       "}\n",
       ".toolbar select,\n",
       ".toolbar label {\n",
       " width: auto;\n",
       " vertical-align: middle;\n",
       " margin-right: 0px;\n",
       " margin-bottom: 0px;\n",
       " display: inline;\n",
       " font-size: 92%;\n",
       " margin-left: 10px;\n",
       " padding: 0px;\n",
       " background: #252e3a !important;\n",
       " background-color: #252e3a !important;\n",
       " border: 2px solid #212934 !important;\n",
       "}\n",
       ".form-control:focus {\n",
       " border-color: #0b98c8;\n",
       " outline: 2px solid rgba(0,156,209,.5);\n",
       " -webkit-box-shadow: none;\n",
       "}\n",
       "::-webkit-input-placeholder {\n",
       " color: #546386;\n",
       "}\n",
       "::-moz-placeholder {\n",
       " color: #546386;\n",
       "}\n",
       ":-ms-input-placeholder {\n",
       " color: #546386;\n",
       "}\n",
       ":-moz-placeholder {\n",
       " color: #546386;\n",
       "}\n",
       "[dir=\"ltr\"] #find-and-replace .input-group-btn + .form-control {\n",
       " border: 2px solid rgba(75,95,118,.30) !important;\n",
       "}\n",
       "[dir=\"ltr\"] #find-and-replace .input-group-btn + .form-control:focus {\n",
       " border-color: #0b98c8;\n",
       " outline: 2px solid rgba(0,156,209,.5);\n",
       " -webkit-box-shadow: none;\n",
       " box-shadow: none;\n",
       "}\n",
       "div.output.output_scroll {\n",
       " box-shadow: none;\n",
       "}\n",
       "::-webkit-scrollbar {\n",
       " width: 11px;\n",
       " max-height: 9px;\n",
       " background-color: #292d3a;\n",
       " border-radius: 3px;\n",
       " border: none;\n",
       "}\n",
       "::-webkit-scrollbar-track {\n",
       " background: #292d3a;\n",
       " border: none;\n",
       " width: 11px;\n",
       " max-height: 9px;\n",
       "}\n",
       "::-webkit-scrollbar-thumb {\n",
       " border-radius: 2px;\n",
       " border: none;\n",
       " background: #3f4555;\n",
       " background-clip: content-box;\n",
       " width: 11px;\n",
       "}\n",
       "HTML,\n",
       "body,\n",
       "div,\n",
       "dl,\n",
       "dt,\n",
       "dd,\n",
       "ul,\n",
       "ol,\n",
       "li,\n",
       "h1,\n",
       "h2,\n",
       "h3,\n",
       "h4,\n",
       "h5,\n",
       "h6,\n",
       "pre,\n",
       "code,\n",
       "form,\n",
       "fieldset,\n",
       "legend,\n",
       "input,\n",
       "button,\n",
       "textarea,\n",
       "p,\n",
       "blockquote,\n",
       "th,\n",
       "td,\n",
       "span,\n",
       "a {\n",
       " text-rendering: geometricPrecision;\n",
       " -webkit-font-smoothing: subpixel-antialiased;\n",
       " font-weight: 400;\n",
       "}\n",
       "div.input_area {\n",
       " background-color: #293340;\n",
       " background: #293340;\n",
       " padding-right: 1.2em;\n",
       " border: 0px;\n",
       " border-radius: 0px;\n",
       " border-top-right-radius: 4px;\n",
       " border-bottom-right-radius: 4px;\n",
       "}\n",
       "div.cell {\n",
       " padding: 0px;\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       " border: medium solid #1a2028;\n",
       " border-radius: 4px;\n",
       " top: 0;\n",
       "}\n",
       "div.cell.selected {\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       " border: medium solid #1a2028;\n",
       " padding: 0px;\n",
       " border-radius: 5px;\n",
       "}\n",
       ".edit_mode div.cell.selected {\n",
       " padding: 0px;\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       " border: medium solid #1a2028;\n",
       " border-radius: 5px;\n",
       "}\n",
       "div.cell.edit_mode {\n",
       " padding: 0px;\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       "}\n",
       "div.CodeMirror-sizer {\n",
       " margin-left: 0px;\n",
       " margin-bottom: -21px;\n",
       " border-right-width: 16px;\n",
       " min-height: 37px;\n",
       " padding-right: 0px;\n",
       " padding-bottom: 0px;\n",
       " margin-top: 0px;\n",
       "}\n",
       "div.cell.selected:before,\n",
       ".edit_mode div.cell.selected:before,\n",
       "div.cell.selected:before,\n",
       "div.cell.selected.jupyter-soft-selected:before {\n",
       " background: #293340 !important;\n",
       " border: none;\n",
       " border-radius: 3px;\n",
       " position: absolute;\n",
       " display: block;\n",
       " top: 0px;\n",
       " left: 0px;\n",
       " width: 0px;\n",
       " height: 100%;\n",
       "}\n",
       "div.cell.text_cell.selected::before,\n",
       ".edit_mode div.cell.text_cell.selected:before,\n",
       "div.cell.text_cell.selected:before,\n",
       "div.cell.text_cell.selected.jupyter-soft-selected:before {\n",
       " background: #293340 !important;\n",
       " background-color: #293340 !important;\n",
       " border-color: #0b98c8 !important;\n",
       "}\n",
       "div.cell.code_cell .input {\n",
       " border-left: 5px solid #293340 !important;\n",
       " border-radius: 3px;\n",
       " border-bottom-left-radius: 3px;\n",
       " border-top-left-radius: 3px;\n",
       "}\n",
       "div.cell.code_cell.selected .input {\n",
       " border-left: 5px solid #008ebf !important;\n",
       " border-radius: 3px;\n",
       "}\n",
       ".edit_mode div.cell.code_cell.selected .input {\n",
       " border-left: 5px solid #005573 !important;\n",
       " border-radius: 3px;\n",
       "}\n",
       ".edit_mode div.cell.selected:before {\n",
       " height: 100%;\n",
       " border-left: 5px solid #005573 !important;\n",
       " border-radius: 3px;\n",
       "}\n",
       "div.cell.jupyter-soft-selected,\n",
       "div.cell.selected.jupyter-soft-selected {\n",
       " border-left-color: #005573 !important;\n",
       " border-left-width: 0px !important;\n",
       " padding-left: 7px !important;\n",
       " border-right-color: #005573 !important;\n",
       " border-right-width: 0px !important;\n",
       " background: #005573 !important;\n",
       " border-radius: 6px !important;\n",
       "}\n",
       "div.cell.selected.jupyter-soft-selected .input {\n",
       " border-left: 5px solid #293340 !important;\n",
       "}\n",
       "div.cell.selected.jupyter-soft-selected {\n",
       " border-left-color: #008ebf;\n",
       " border-color: #1a2028;\n",
       " padding-left: 7px;\n",
       " border-radius: 6px;\n",
       "}\n",
       "div.cell.code_cell.selected .input {\n",
       " border-left: none;\n",
       " border-radius: 3px;\n",
       "}\n",
       "div.cell.selected.jupyter-soft-selected .prompt,\n",
       "div.cell.text_cell.selected.jupyter-soft-selected .prompt {\n",
       " top: 0;\n",
       " border-left: #293340 !important;\n",
       " border-radius: 2px;\n",
       "}\n",
       "div.cell.text_cell.selected.jupyter-soft-selected .input_prompt {\n",
       " border-left: none !important;\n",
       "}\n",
       "div.cell.text_cell.jupyter-soft-selected,\n",
       "div.cell.text_cell.selected.jupyter-soft-selected {\n",
       " border-left-color: #005573 !important;\n",
       " border-left-width: 0px !important;\n",
       " padding-left: 26px !important;\n",
       " border-right-color: #005573 !important;\n",
       " border-right-width: 0px !important;\n",
       " background: #005573 !important;\n",
       " border-radius: 5px !important;\n",
       "}\n",
       "div.cell.jupyter-soft-selected .input,\n",
       "div.cell.selected.jupyter-soft-selected .input {\n",
       " border-left-color: #005573 !important;\n",
       "}\n",
       "div.prompt,\n",
       ".prompt {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 9pt !important;\n",
       " font-weight: normal;\n",
       " color: #546386;\n",
       " line-height: 170%;\n",
       " padding: 0px;\n",
       " padding-top: 4px;\n",
       " padding-left: 0px;\n",
       " padding-right: 1px;\n",
       " text-align: right !important;\n",
       " min-width: 11.5ex !important;\n",
       " width: 11.5ex !important;\n",
       "}\n",
       "div.prompt.input_prompt {\n",
       " font-size: 9pt !important;\n",
       " background-color: #293340;\n",
       " border-top: 0px;\n",
       " border-top-right-radius: 0px;\n",
       " border-bottom-left-radius: 0px;\n",
       " border-bottom-right-radius: 0px;\n",
       " padding-right: 3px;\n",
       " min-width: 11.5ex;\n",
       " width: 11.5ex !important;\n",
       "}\n",
       "div.cell.code_cell .input_prompt {\n",
       " border-right: 2px solid rgba(0,156,209,.5);\n",
       "}\n",
       "div.cell.selected .prompt {\n",
       " top: 0;\n",
       "}\n",
       ".edit_mode div.cell.selected .prompt {\n",
       " top: 0;\n",
       "}\n",
       ".edit_mode div.cell.selected .prompt {\n",
       " top: 0;\n",
       "}\n",
       ".run_this_cell {\n",
       " visibility: hidden;\n",
       " color: transparent;\n",
       " padding-top: 0px;\n",
       " padding-bottom: 0px;\n",
       " padding-left: 3px;\n",
       " padding-right: 12px;\n",
       " width: 1.5ex;\n",
       " width: 0ex;\n",
       " background: transparent;\n",
       " background-color: transparent;\n",
       "}\n",
       "div.code_cell:hover div.input .run_this_cell {\n",
       " visibility: visible;\n",
       "}\n",
       "div.cell.code_cell.rendered.selected .run_this_cell:hover {\n",
       " background-color: #212934;\n",
       " background: #212934;\n",
       " color: #008ebf !important;\n",
       "}\n",
       "div.cell.code_cell.rendered.unselected .run_this_cell:hover {\n",
       " background-color: #212934;\n",
       " background: #212934;\n",
       " color: #008ebf !important;\n",
       "}\n",
       "i.fa-step-forward.fa {\n",
       " display: inline-block;\n",
       " font: normal normal normal 9px \"FontAwesome\";\n",
       "}\n",
       ".fa-step-forward:before {\n",
       " content: \"\\f04b\";\n",
       "}\n",
       "div.cell.selected.jupyter-soft-selected .run_this_cell,\n",
       "div.cell.selected.jupyter-soft-selected .run_this_cell:hover,\n",
       "div.cell.unselected.jupyter-soft-selected .run_this_cell:hover,\n",
       "div.cell.code_cell.rendered.selected.jupyter-soft-selected .run_this_cell:hover,\n",
       "div.cell.code_cell.rendered.unselected.jupyter-soft-selected .run_this_cell:hover {\n",
       " background-color: #005573 !important;\n",
       " background: #005573 !important;\n",
       " color: #005573 !important;\n",
       "}\n",
       "div.output_wrapper {\n",
       " background-color: #323a48;\n",
       " border: 0px;\n",
       " left: 0px;\n",
       " margin-bottom: 0em;\n",
       " margin-top: 0em;\n",
       " border-top-right-radius: 0px;\n",
       " border-top-left-radius: 0px;\n",
       "}\n",
       "div.output_subarea.output_text.output_stream.output_stdout,\n",
       "div.output_subarea.output_text {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 8.5pt !important;\n",
       " line-height: 150% !important;\n",
       " background-color: #323a48;\n",
       " color: #b4bcde;\n",
       " border-top-right-radius: 0px;\n",
       " border-top-left-radius: 0px;\n",
       " margin-left: 11.5px;\n",
       "}\n",
       "div.output_area pre {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 8.5pt !important;\n",
       " line-height: 151% !important;\n",
       " color: #b4bcde;\n",
       " border-top-right-radius: 0px;\n",
       " border-top-left-radius: 0px;\n",
       "}\n",
       "div.output_area {\n",
       " display: -webkit-box;\n",
       "}\n",
       "div.output_html {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 8.5pt;\n",
       " color: #e2e5f2;\n",
       " background-color: #323a48;\n",
       " background: #323a48;\n",
       "}\n",
       "div.output_subarea {\n",
       " overflow-x: auto;\n",
       " padding: 1.2em !important;\n",
       " -webkit-box-flex: 1;\n",
       " -moz-box-flex: 1;\n",
       " box-flex: 1;\n",
       " flex: 1;\n",
       "}\n",
       "div.btn.btn-default.output_collapsed {\n",
       " background: #1b1f26;\n",
       " background-color: #1b1f26;\n",
       " border-color: #1b1f26;\n",
       "}\n",
       "div.btn.btn-default.output_collapsed:hover {\n",
       " background: #161a20;\n",
       " background-color: #161a20;\n",
       " border-color: #161a20;\n",
       "}\n",
       "div.prompt.output_prompt {\n",
       " font-family: monospace, monospace;\n",
       " font-weight: bold !important;\n",
       " background-color: #323a48;\n",
       " color: transparent;\n",
       " border-bottom-left-radius: 4px;\n",
       " border-top-right-radius: 0px;\n",
       " border-top-left-radius: 0px;\n",
       " border-bottom-right-radius: 0px;\n",
       " min-width: 11.5ex !important;\n",
       " width: 11.5ex !important;\n",
       " border-right: 2px solid transparent;\n",
       "}\n",
       "div.out_prompt_overlay.prompt {\n",
       " font-family: monospace, monospace;\n",
       " font-weight: bold !important;\n",
       " background-color: #323a48;\n",
       " border-bottom-left-radius: 2px;\n",
       " border-top-right-radius: 0px;\n",
       " border-top-left-radius: 0px;\n",
       " border-bottom-right-radius: 0px;\n",
       " min-width: 11.5ex !important;\n",
       " width: 11.5ex !important;\n",
       " border-right: 2px solid transparent;\n",
       " color: transparent;\n",
       "}\n",
       "div.out_prompt_overlay.prompt:hover {\n",
       " background-color: #374556;\n",
       " box-shadow: none !important;\n",
       " border: none;\n",
       " border-bottom-left-radius: 2px;\n",
       " -webkit-border-: 2px;\n",
       " -moz-border-radius: 2px;\n",
       " border-top-right-radius: 0px;\n",
       " border-top-left-radius: 0px;\n",
       " min-width: 11.5ex !important;\n",
       " width: 11.5ex !important;\n",
       " border-right: 2px solid #374556 !important;\n",
       "}\n",
       "div.cell.code_cell .output_prompt {\n",
       " border-right: 2px solid transparent;\n",
       " color: transparent;\n",
       "}\n",
       "div.cell.selected .output_prompt,\n",
       "div.cell.selected .out_prompt_overlay.prompt {\n",
       " border-left: 5px solid #005573;\n",
       " border-right: 2px solid #323a48;\n",
       " border-radius: 0px !important;\n",
       "}\n",
       ".edit_mode div.cell.selected .output_prompt,\n",
       ".edit_mode div.cell.selected .out_prompt_overlay.prompt {\n",
       " border-left: 5px solid #005573;\n",
       " border-right: 2px solid #323a48;\n",
       " border-radius: 0px !important;\n",
       "}\n",
       "div.text_cell,\n",
       "div.text_cell_render pre,\n",
       "div.text_cell_render {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " line-height: 130% !important;\n",
       " color: #b0bdd7;\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       " border-radius: 0px;\n",
       "}\n",
       "div .text_cell_render {\n",
       " padding: 0.4em 0.4em 0.4em 0.4em;\n",
       "}\n",
       "div.cell.text_cell .CodeMirror-lines {\n",
       " padding-top: .7em !important;\n",
       " padding-bottom: .4em !important;\n",
       " padding-left: .5em !important;\n",
       " padding-right: .5em !important;\n",
       " margin-top: .4em;\n",
       " margin-bottom: .3em;\n",
       "}\n",
       "div.cell.text_cell.unrendered div.input_area,\n",
       "div.cell.text_cell.rendered div.input_area {\n",
       " background-color: #293340;\n",
       " background: #293340;\n",
       " border: 0px;\n",
       " border-radius: 2px;\n",
       "}\n",
       "div.cell.text_cell .CodeMirror,\n",
       "div.cell.text_cell .CodeMirror pre {\n",
       " line-height: 170% !important;\n",
       "}\n",
       "div.cell.text_cell.rendered.selected {\n",
       " font-family: sans-serif;\n",
       " line-height: 170% !important;\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       " border-radius: 0px;\n",
       "}\n",
       "div.cell.text_cell.unrendered.selected {\n",
       " font-family: sans-serif;\n",
       " line-height: 170% !important;\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       " border-radius: 0px;\n",
       "}\n",
       "div.cell.text_cell.selected {\n",
       " font-family: sans-serif;\n",
       " line-height: 170% !important;\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       " border-radius: 0px;\n",
       "}\n",
       ".edit_mode div.cell.text_cell.selected {\n",
       " font-family: sans-serif;\n",
       " line-height: 170% !important;\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       " border-radius: 0px;\n",
       "}\n",
       "div.text_cell.unrendered,\n",
       "div.text_cell.unrendered.selected,\n",
       "div.edit_mode div.text_cell.unrendered {\n",
       " font-family: sans-serif;\n",
       " line-height: 170% !important;\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       " border-radius: 0px;\n",
       "}\n",
       "div.cell.text_cell .prompt {\n",
       " border-right: 0;\n",
       " min-width: 11.5ex !important;\n",
       " width: 11.5ex !important;\n",
       "}\n",
       "div.cell.text_cell.rendered .prompt {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 9.5pt !important;\n",
       " font-weight: normal;\n",
       " color: #546386 !important;\n",
       " text-align: right !important;\n",
       " min-width: 14.5ex !important;\n",
       " width: 14.5ex !important;\n",
       " background-color: #293340;\n",
       " border-right: 2px solid rgba(0,156,209,.5);\n",
       " border-left: 4px solid #293340;\n",
       "}\n",
       "div.cell.text_cell.unrendered .prompt {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 9.5pt !important;\n",
       " font-weight: normal;\n",
       " color: #546386 !important;\n",
       " text-align: right !important;\n",
       " min-width: 14.5ex !important;\n",
       " width: 14.5ex !important;\n",
       " border-right: 2px solid rgba(0,156,209,.5);\n",
       " border-left: 4px solid #293340;\n",
       " background-color: #293340;\n",
       "}\n",
       "div.cell.text_cell.rendered .prompt {\n",
       " border-right: 2px solid rgba(0,156,209,.5);\n",
       "}\n",
       "div.cell.text_cell.rendered.selected .prompt {\n",
       " top: 0;\n",
       " border-left: 4px solid #0b98c8;\n",
       " border-right: 2px solid rgba(0,156,209,.5);\n",
       "}\n",
       "div.text_cell.unrendered.selected .prompt,\n",
       "div.text_cell.rendered.selected .prompt {\n",
       " top: 0;\n",
       " background: #293340;\n",
       " border-left: 4px solid #005573;\n",
       " border-right: 2px solid rgba(0,156,209,.5);\n",
       "}\n",
       "div.rendered_html code {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 11pt;\n",
       " padding-top: 3px;\n",
       " padding-left: 2px;\n",
       " color: #cdd2e9;\n",
       " background: #252e3a;\n",
       " background-color: #252e3a;\n",
       "}\n",
       "pre,\n",
       "code,\n",
       "kbd,\n",
       "samp {\n",
       " white-space: pre-wrap;\n",
       "}\n",
       ".well code,\n",
       "code {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 11pt !important;\n",
       " line-height: 170% !important;\n",
       " color: #b0bdd7;\n",
       " background: #252e3a;\n",
       " background-color: #252e3a;\n",
       " border-color: #252e3a;\n",
       "}\n",
       "kbd {\n",
       " padding: 1px;\n",
       " font-size: 11pt;\n",
       " font-weight: 800;\n",
       " color: #cdd2e9;\n",
       " background-color: transparent !important;\n",
       " border: 0;\n",
       " box-shadow: none;\n",
       "}\n",
       "pre {\n",
       " display: block;\n",
       " padding: 8.5px;\n",
       " margin: 0 0 9px;\n",
       " font-size: 12.0pt;\n",
       " line-height: 1.42857143;\n",
       " color: #cdd2e9;\n",
       " background-color: #252e3a;\n",
       " border: 1px solid #252e3a;\n",
       " border-radius: 2px;\n",
       "}\n",
       "div.rendered_html {\n",
       " color: #b0bdd7;\n",
       "}\n",
       ".rendered_html * + ul {\n",
       " margin-top: .4em;\n",
       " margin-bottom: .3em;\n",
       "}\n",
       ".rendered_html * + p {\n",
       " margin-top: .5em;\n",
       " margin-bottom: .5em;\n",
       "}\n",
       "div.rendered_html pre {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 11pt !important;\n",
       " line-height: 170% !important;\n",
       " color: #b0bdd7 !important;\n",
       " background: #252e3a;\n",
       " background-color: #252e3a;\n",
       " max-width: 80%;\n",
       " border-radius: 0px;\n",
       " border-left: 3px solid #252e3a;\n",
       " max-width: 80%;\n",
       " border-radius: 0px;\n",
       " padding-left: 5px;\n",
       " margin-left: 6px;\n",
       "}\n",
       "div.text_cell_render pre,\n",
       "div.text_cell_render code {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 11pt !important;\n",
       " line-height: 170% !important;\n",
       " color: #b0bdd7;\n",
       " background: #1a2028;\n",
       " background-color: #1a2028;\n",
       " max-width: 80%;\n",
       " border-radius: 0px;\n",
       " border-left: none;\n",
       "}\n",
       "div.text_cell_render pre {\n",
       " border-left: 3px solid rgba(0,156,209,.5) !important;\n",
       " max-width: 80%;\n",
       " border-radius: 0px;\n",
       " padding-left: 5px;\n",
       " margin-left: 6px;\n",
       "}\n",
       "div.text_cell_render h1,\n",
       "div.rendered_html h1,\n",
       "div.text_cell_render h2,\n",
       "div.rendered_html h2,\n",
       "div.text_cell_render h3,\n",
       "div.rendered_html h3,\n",
       "div.text_cell_render h4,\n",
       "div.rendered_html h4,\n",
       "div.text_cell_render h5,\n",
       "div.rendered_html h5 {\n",
       " font-family: sans-serif;\n",
       " margin: 0.4em .2em .3em .2em !important;\n",
       "}\n",
       ".rendered_html h1:first-child,\n",
       ".rendered_html h2:first-child,\n",
       ".rendered_html h3:first-child,\n",
       ".rendered_html h4:first-child,\n",
       ".rendered_html h5:first-child,\n",
       ".rendered_html h6:first-child {\n",
       " margin-top: 0.2em !important;\n",
       " margin-bottom: 0.2em !important;\n",
       "}\n",
       ".rendered_html h1,\n",
       ".text_cell_render h1 {\n",
       " color: #0b98c8 !important;\n",
       " font-size: 200%;\n",
       " text-align: left;\n",
       " font-style: normal;\n",
       " font-weight: normal;\n",
       "}\n",
       ".rendered_html h2,\n",
       ".text_cell_render h2 {\n",
       " color: #0b98c8 !important;\n",
       " font-size: 170%;\n",
       " font-style: normal;\n",
       " font-weight: normal;\n",
       "}\n",
       ".rendered_html h3,\n",
       ".text_cell_render h3 {\n",
       " color: #0b98c8 !important;\n",
       " font-size: 140%;\n",
       " font-style: normal;\n",
       " font-weight: normal;\n",
       "}\n",
       ".rendered_html h4,\n",
       ".text_cell_render h4 {\n",
       " color: #0b98c8 !important;\n",
       " font-size: 110%;\n",
       " font-style: normal;\n",
       " font-weight: normal;\n",
       "}\n",
       ".rendered_html h5,\n",
       ".text_cell_render h5 {\n",
       " color: #0b98c8 !important;\n",
       " font-size: 100%;\n",
       " font-style: normal;\n",
       " font-weight: normal;\n",
       "}\n",
       "hr {\n",
       " margin-top: 8px;\n",
       " margin-bottom: 10px;\n",
       " border: 0;\n",
       " border-top: 1px solid #0b98c8;\n",
       "}\n",
       ".rendered_html hr {\n",
       " color: #0b98c8;\n",
       " background-color: #0b98c8;\n",
       " margin-right: 2em;\n",
       "}\n",
       "#complete > select > option:hover {\n",
       " background: #323b48;\n",
       " background-color: #323b48;\n",
       "}\n",
       "div#_vivaldi-spatnav-focus-indicator._vivaldi-spatnav-focus-indicator {\n",
       " position: absolute;\n",
       " z-index: 9999999999;\n",
       " top: 0px;\n",
       " left: 0px;\n",
       " box-shadow: none;\n",
       " pointer-events: none;\n",
       " border-radius: 2px;\n",
       "}\n",
       ".rendered_html tr,\n",
       ".rendered_html th,\n",
       ".rendered_html td {\n",
       " text-align: left;\n",
       " vertical-align: middle;\n",
       " padding: 0.42em 0.47em;\n",
       " line-height: normal;\n",
       " white-space: normal;\n",
       " max-width: none;\n",
       " border: none;\n",
       "}\n",
       ".rendered_html td {\n",
       " font-family: sans-serif !important;\n",
       " font-size: 9.3pt;\n",
       "}\n",
       ".rendered_html table {\n",
       " font-family: sans-serif !important;\n",
       " margin-left: 8px;\n",
       " margin-right: auto;\n",
       " border: none;\n",
       " border-collapse: collapse;\n",
       " border-spacing: 0;\n",
       " color: #e2e5f2;\n",
       " table-layout: fixed;\n",
       "}\n",
       ".rendered_html thead {\n",
       " font-family: sans-serif !important;\n",
       " font-size: 10.3pt !important;\n",
       " background: #27313d;\n",
       " color: #bbc2e1;\n",
       " border-bottom: 1px solid #27313d;\n",
       " vertical-align: bottom;\n",
       "}\n",
       ".rendered_html tbody tr:nth-child(odd) {\n",
       " background: #3f495a;\n",
       "}\n",
       ".rendered_html tbody tr {\n",
       " background: #394251;\n",
       "}\n",
       ".rendered_html tbody tr:hover:nth-child(odd) {\n",
       " background: #3d4757;\n",
       "}\n",
       ".rendered_html tbody tr:hover {\n",
       " background: #373f4e;\n",
       "}\n",
       ".rendered_html * + table {\n",
       " margin-top: .05em;\n",
       "}\n",
       "div.widget-area {\n",
       " background-color: #323a48;\n",
       " background: #323a48;\n",
       " color: #b4bcde;\n",
       "}\n",
       "div.widget-area a {\n",
       " font-family: sans-serif;\n",
       " font-size: 12.0pt;\n",
       " font-weight: normal;\n",
       " font-style: normal;\n",
       " color: #a2b0c7;\n",
       " text-shadow: none !important;\n",
       "}\n",
       "div.widget-area a:hover,\n",
       "div.widget-area a:focus {\n",
       " font-family: sans-serif;\n",
       " font-size: 12.0pt;\n",
       " font-weight: normal;\n",
       " font-style: normal;\n",
       " color: #dbe1ea;\n",
       " background: rgba(75,95,118,.30);\n",
       " background-color: rgba(75,95,118,.30);\n",
       " border-color: transparent;\n",
       " background-image: none;\n",
       " text-shadow: none !important;\n",
       "}\n",
       "div.widget_item.btn-group > button.btn.btn-default.widget-combo-btn,\n",
       "div.widget_item.btn-group > button.btn.btn-default.widget-combo-btn:hover {\n",
       " background: #232932;\n",
       " background-color: #232932;\n",
       " border: 2px solid #232932 !important;\n",
       " font-size: inherit;\n",
       " z-index: 0;\n",
       "}\n",
       "div.jupyter-widgets.widget-hprogress.widget-hbox {\n",
       " display: inline-table !important;\n",
       " width: 38% !important;\n",
       " margin-left: 10px;\n",
       "}\n",
       "div.jupyter-widgets.widget-hprogress.widget-hbox .widget-label,\n",
       "div.widget-hbox .widget-label,\n",
       ".widget-hbox .widget-label,\n",
       ".widget-inline-hbox .widget-label,\n",
       "div.widget-label {\n",
       " text-align: -webkit-auto !important;\n",
       " margin-left: 15px !important;\n",
       " max-width: 240px !important;\n",
       " min-width: 100px !important;\n",
       " vertical-align: text-top !important;\n",
       " color: #b4bcde !important;\n",
       " font-size: 14px !important;\n",
       "}\n",
       ".widget-hprogress .progress {\n",
       " flex-grow: 1;\n",
       " height: 20px;\n",
       " margin-top: auto;\n",
       " margin-left: 12px;\n",
       " margin-bottom: auto;\n",
       " width: 300px;\n",
       "}\n",
       ".progress {\n",
       " overflow: hidden;\n",
       " height: 22px;\n",
       " margin-bottom: 10px;\n",
       " padding-left: 10px;\n",
       " background-color: #4a5569 !important;\n",
       " border-radius: 2px;\n",
       " -webkit-box-shadow: none;\n",
       " box-shadow: none;\n",
       " z-index: 10;\n",
       "}\n",
       ".progress-bar-danger {\n",
       " background-color: #e74c3c !important;\n",
       "}\n",
       ".progress-bar-info {\n",
       " background-color: #3498db !important;\n",
       "}\n",
       ".progress-bar-warning {\n",
       " background-color: #ff914d !important;\n",
       "}\n",
       ".progress-bar-success {\n",
       " background-color: #83a83b !important;\n",
       "}\n",
       ".widget-select select {\n",
       " margin-left: 12px;\n",
       "}\n",
       ".rendered_html :link {\n",
       " font-family: sans-serif;\n",
       " font-size: 100%;\n",
       " color: #0b98c8;\n",
       " text-decoration: underline;\n",
       "}\n",
       ".rendered_html :visited,\n",
       ".rendered_html :visited:active,\n",
       ".rendered_html :visited:focus {\n",
       " color: #12a3d6;\n",
       "}\n",
       ".rendered_html :visited:hover,\n",
       ".rendered_html :link:hover {\n",
       " font-family: sans-serif;\n",
       " font-size: 100%;\n",
       " color: #0080aa;\n",
       "}\n",
       "div.cell.text_cell a.anchor-link:link {\n",
       " font-size: inherit;\n",
       " text-decoration: none;\n",
       " padding: 0px 20px;\n",
       " visibility: none;\n",
       " color: rgba(0,0,0,.32);\n",
       "}\n",
       "div.cell.text_cell a.anchor-link:link:hover {\n",
       " font-size: inherit;\n",
       " color: #0dc1ff;\n",
       "}\n",
       ".navbar-text {\n",
       " margin-top: 4px;\n",
       " margin-bottom: 0px;\n",
       "}\n",
       "#clusters > a {\n",
       " color: #51c0ef;\n",
       " text-decoration: underline;\n",
       " cursor: auto;\n",
       "}\n",
       "#clusters > a:hover {\n",
       " color: #4c8be2;\n",
       " text-decoration: underline;\n",
       " cursor: auto;\n",
       "}\n",
       "#nbextensions-configurator-container > div.row.container-fluid.nbext-selector > h3 {\n",
       " font-size: 17px;\n",
       " margin-top: 5px;\n",
       " margin-bottom: 8px;\n",
       " height: 24px;\n",
       " padding: 4px 0 4px 0;\n",
       "}\n",
       "div#nbextensions-configurator-container.container,\n",
       "#nbextensions-configurator-container.container {\n",
       " width: 100%;\n",
       " margin-right: auto;\n",
       " margin-left: auto;\n",
       "}\n",
       "div.nbext-selector > nav > .nav > li > a {\n",
       " font-family: sans-serif;\n",
       " font-size: 10.5pt;\n",
       " padding: 2px 5px;\n",
       "}\n",
       "div.nbext-selector > nav > .nav > li > a:hover {\n",
       " background: transparent;\n",
       "}\n",
       "div.nbext-selector > nav > .nav > li:hover {\n",
       " background-color: rgba(75,95,118,.30) !important;\n",
       " background: rgba(75,95,118,.30) !important;\n",
       "}\n",
       "div.nbext-selector > nav > .nav > li.active:hover {\n",
       " background: transparent !important;\n",
       " background-color: transparent !important;\n",
       "}\n",
       ".nav-pills > li.active > a,\n",
       ".nav-pills > li.active > a:active,\n",
       ".nav-pills > li.active > a:hover,\n",
       ".nav-pills > li.active > a:focus {\n",
       " color: #fefefe;\n",
       " background-color: rgba(75,95,118,.30) !important;\n",
       " background: rgba(75,95,118,.30) !important;\n",
       " -webkit-backface-visibility: hidden;\n",
       " -webkit-font-smoothing: subpixel-antialiased !important;\n",
       "}\n",
       "div.nbext-readme > .nbext-readme-contents > .rendered_html {\n",
       " font-family: sans-serif;\n",
       " font-size: 11.5pt;\n",
       " line-height: 145%;\n",
       " padding: 1em 1em;\n",
       " color: #b0bdd7;\n",
       " background-color: #293340;\n",
       " -webkit-box-shadow: none;\n",
       " -moz-box-shadow: none;\n",
       " box-shadow: none;\n",
       "}\n",
       ".nbext-icon,\n",
       ".nbext-desc,\n",
       ".nbext-compat-div,\n",
       ".nbext-enable-btns,\n",
       ".nbext-params {\n",
       " margin-bottom: 8px;\n",
       " font-size: 11.5pt;\n",
       "}\n",
       "div.nbext-readme > .nbext-readme-contents {\n",
       " padding: 0;\n",
       " overflow-y: hidden;\n",
       "}\n",
       "div.nbext-readme > .nbext-readme-contents:not(:empty) {\n",
       " margin-top: 0.5em;\n",
       " margin-bottom: 2em;\n",
       " border: none;\n",
       " border-top-color: rgba(0,156,209,.3);\n",
       "}\n",
       ".nbext-showhide-incompat {\n",
       " padding-bottom: 0.5em;\n",
       " color: #92a2bd;\n",
       " font-size: 10.5pt;\n",
       "}\n",
       ".nbext-filter-menu.dropdown-menu > li > a:hover,\n",
       ".nbext-filter-menu.dropdown-menu > li > a:focus,\n",
       ".nbext-filter-menu.dropdown-menu > li > a.ui-state-focus {\n",
       " color: #dbe1ea !important;\n",
       " background-color: #323b48 !important;\n",
       " background: #323b48 !important;\n",
       " border-color: #323b48 !important;\n",
       "}\n",
       ".nbext-filter-input-wrap > .nbext-filter-input-subwrap,\n",
       ".nbext-filter-input-wrap > .nbext-filter-input-subwrap > input {\n",
       " border: none;\n",
       " outline: none;\n",
       " background-color: transparent;\n",
       " padding: 0;\n",
       " vertical-align: middle;\n",
       " margin-top: -2px;\n",
       "}\n",
       "span.rendered_html code {\n",
       " background-color: transparent;\n",
       " color: #a2b0c7;\n",
       "}\n",
       "#nbextensions-configurator-container > div.row.container-fluid.nbext-selector {\n",
       " padding-left: 0px;\n",
       " padding-right: 0px;\n",
       "}\n",
       ".nbext-filter-menu {\n",
       " max-height: 55vh !important;\n",
       " overflow-y: auto;\n",
       " outline: none;\n",
       " border: none;\n",
       "}\n",
       ".nbext-filter-menu:hover {\n",
       " border: none;\n",
       "}\n",
       ".alert-warning {\n",
       " background-color: #2d3846;\n",
       " border-color: #2d3846;\n",
       " color: #a2b0c7;\n",
       "}\n",
       ".notification_widget.danger {\n",
       " color: #ffffff;\n",
       " background-color: #e74c3c;\n",
       " border-color: #e74c3c;\n",
       " padding-right: 5px;\n",
       "}\n",
       "#nbextensions-configurator-container > div.nbext-buttons.tree-buttons.no-padding.pull-right > span > button {\n",
       " border: none !important;\n",
       "}\n",
       "button#refresh_running_list {\n",
       " border: none !important;\n",
       "}\n",
       "mark,\n",
       ".mark {\n",
       " background-color: #293340;\n",
       " color: #b0bdd7;\n",
       " padding: .15em;\n",
       "}\n",
       "a.text-warning,\n",
       "a.text-warning:hover {\n",
       " color: #546386;\n",
       "}\n",
       "a.text-warning.bg-warning {\n",
       " background-color: #1a2028;\n",
       "}\n",
       "span.bg-success.text-success {\n",
       " background-color: transparent;\n",
       " color: #48a667;\n",
       "}\n",
       "span.bg-danger.text-danger {\n",
       " background-color: #1a2028;\n",
       " color: #dc6972;\n",
       "}\n",
       ".has-success .input-group-addon {\n",
       " color: #48a667;\n",
       " border-color: transparent;\n",
       " background: inherit;\n",
       " background-color: rgba(83,180,115,.10);\n",
       "}\n",
       ".has-success .form-control {\n",
       " border-color: #48a667;\n",
       " -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.025);\n",
       " box-shadow: inset 0 1px 1px rgba(0,0,0,0.025);\n",
       "}\n",
       ".has-error .input-group-addon {\n",
       " color: #dc6972;\n",
       " border-color: transparent;\n",
       " background: inherit;\n",
       " background-color: rgba(192,57,67,.10);\n",
       "}\n",
       ".has-error .form-control {\n",
       " border-color: #dc6972;\n",
       " -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.025);\n",
       " box-shadow: inset 0 1px 1px rgba(0,0,0,0.025);\n",
       "}\n",
       ".kse-input-group-pretty > kbd {\n",
       " font-family: monospace, monospace;\n",
       " color: #a2b0c7;\n",
       " font-weight: normal;\n",
       " background: transparent;\n",
       "}\n",
       ".kse-input-group-pretty > kbd {\n",
       " font-family: monospace, monospace;\n",
       " color: #a2b0c7;\n",
       " font-weight: normal;\n",
       " background: transparent;\n",
       "}\n",
       "div.nbext-enable-btns .btn[disabled],\n",
       "div.nbext-enable-btns .btn[disabled]:hover,\n",
       ".btn-default.disabled,\n",
       ".btn-default[disabled] {\n",
       " background: #232c37;\n",
       " background-color: #232c37;\n",
       " color: #98a8c1;\n",
       "}\n",
       "label#Keyword-Filter {\n",
       " display: none;\n",
       "}\n",
       ".input-group .nbext-list-btn-add,\n",
       ".input-group-btn:last-child > .btn-group > .btn {\n",
       " background: #252b35;\n",
       " background-color: #252b35;\n",
       " border-color: #252b35;\n",
       " border: 2px solid #252b35;\n",
       "}\n",
       ".input-group .nbext-list-btn-add:hover,\n",
       ".input-group-btn:last-child > .btn-group > .btn:hover {\n",
       " background: #21262f;\n",
       " background-color: #21262f;\n",
       " border-color: #21262f;\n",
       " border: 2px solid #21262f;\n",
       "}\n",
       "#notebook-container > div.cell.code_cell.rendered.selected > div.widget-area > div.widget-subarea > div > div.widget_item.btn-group > button.btn.btn-default.dropdown-toggle.widget-combo-carrot-btn {\n",
       " background: #252b35;\n",
       " background-color: #252b35;\n",
       " border-color: #252b35;\n",
       "}\n",
       "#notebook-container > div.cell.code_cell.rendered.selected > div.widget-area > div.widget-subarea > div > div.widget_item.btn-group > button.btn.btn-default.dropdown-toggle.widget-combo-carrot-btn:hover {\n",
       " background: #21262f;\n",
       " background-color: #21262f;\n",
       " border-color: #21262f;\n",
       "}\n",
       ".ui-widget-content {\n",
       " background: #252e3a;\n",
       " background-color: #252e3a;\n",
       " border: 2px solid #252e3a;\n",
       " color: #a2b0c7;\n",
       "}\n",
       "div.collapsible_headings_toggle {\n",
       " color: rgba(75,95,118,.55) !important;\n",
       "}\n",
       "div.collapsible_headings_toggle:hover {\n",
       " color: #0b98c8 !important;\n",
       "}\n",
       ".collapsible_headings_toggle .h1,\n",
       ".collapsible_headings_toggle .h2,\n",
       ".collapsible_headings_toggle .h3,\n",
       ".collapsible_headings_toggle .h4,\n",
       ".collapsible_headings_toggle .h5,\n",
       ".collapsible_headings_toggle .h6 {\n",
       " margin: 0.3em .4em 0em 0em !important;\n",
       " line-height: 1.2 !important;\n",
       "}\n",
       "div.collapsible_headings_toggle .fa-caret-down:before,\n",
       "div.collapsible_headings_toggle .fa-caret-right:before {\n",
       " font-size: xx-large;\n",
       " transition: transform 1000ms;\n",
       " transform: none !important;\n",
       "}\n",
       ".collapsible_headings_collapsed.collapsible_headings_ellipsis .rendered_html h1:after,\n",
       ".collapsible_headings_collapsed.collapsible_headings_ellipsis .rendered_html h2:after,\n",
       ".collapsible_headings_collapsed.collapsible_headings_ellipsis .rendered_html h3:after,\n",
       ".collapsible_headings_collapsed.collapsible_headings_ellipsis .rendered_html h4:after,\n",
       ".collapsible_headings_collapsed.collapsible_headings_ellipsis .rendered_html h5:after,\n",
       ".collapsible_headings_collapsed.collapsible_headings_ellipsis .rendered_html h6:after {\n",
       " position: absolute;\n",
       " right: 0;\n",
       " bottom: 20% !important;\n",
       " content: \"[\\002026]\";\n",
       " color: rgba(75,95,118,.55) !important;\n",
       " padding: 0.5em 0em 0em 0em !important;\n",
       "}\n",
       ".collapsible_headings_ellipsis .rendered_html h1,\n",
       ".collapsible_headings_ellipsis .rendered_html h2,\n",
       ".collapsible_headings_ellipsis .rendered_html h3,\n",
       ".collapsible_headings_ellipsis .rendered_html h4,\n",
       ".collapsible_headings_ellipsis .rendered_html h5,\n",
       ".collapsible_headings_ellipsis .rendered_html h6,\n",
       ".collapsible_headings_toggle .fa {\n",
       " transition: transform 1000ms !important;\n",
       " -webkit-transform: inherit !important;\n",
       " -moz-transform: inherit !important;\n",
       " -ms-transform: inherit !important;\n",
       " -o-transform: inherit !important;\n",
       " transform: inherit !important;\n",
       " padding-right: 0px !important;\n",
       "}\n",
       "#toc-wrapper {\n",
       " z-index: 90;\n",
       " position: fixed !important;\n",
       " display: flex;\n",
       " flex-direction: column;\n",
       " overflow: hidden;\n",
       " padding: 10px;\n",
       " border-style: solid;\n",
       " border-width: thin;\n",
       " border-right-width: medium !important;\n",
       " background-color: #1a2028 !important;\n",
       "}\n",
       "#toc-wrapper.ui-draggable.ui-resizable.sidebar-wrapper {\n",
       " border-color: rgba(75,95,118,.30) !important;\n",
       "}\n",
       "#toc a,\n",
       "#navigate_menu a,\n",
       ".toc {\n",
       " color: #a2b0c7 !important;\n",
       " font-size: 11pt !important;\n",
       "}\n",
       "#toc li > span:hover {\n",
       " background-color: #323b48 !important;\n",
       "}\n",
       "#toc a:hover,\n",
       "#navigate_menu a:hover,\n",
       ".toc {\n",
       " color: #fefefe !important;\n",
       " font-size: 11pt !important;\n",
       "}\n",
       "#toc-wrapper .toc-item-num {\n",
       " color: #0b98c8 !important;\n",
       " font-size: 11pt !important;\n",
       "}\n",
       "input.raw_input {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 11pt !important;\n",
       " color: #cdd2e9;\n",
       " background-color: #252e3a;\n",
       " border-color: #232c37;\n",
       " background: #232c37;\n",
       " width: auto;\n",
       " vertical-align: baseline;\n",
       " padding: 0em 0.25em;\n",
       " margin: 0em 0.25em;\n",
       " -webkit-box-shadow: none;\n",
       " box-shadow: none;\n",
       "}\n",
       "audio,\n",
       "video {\n",
       " display: inline;\n",
       " vertical-align: middle;\n",
       " align-content: center;\n",
       " margin-left: 20%;\n",
       "}\n",
       ".cmd-palette .modal-body {\n",
       " padding: 0px;\n",
       " margin: 0px;\n",
       "}\n",
       ".cmd-palette form {\n",
       " background: #293547;\n",
       " background-color: #293547;\n",
       "}\n",
       ".typeahead-field input:last-child,\n",
       ".typeahead-hint {\n",
       " background: #293547;\n",
       " background-color: #293547;\n",
       " z-index: 1;\n",
       "}\n",
       ".typeahead-field input {\n",
       " font-family: sans-serif;\n",
       " color: #cdd2e9;\n",
       " border: none;\n",
       " font-size: 28pt;\n",
       " display: inline-block;\n",
       " line-height: inherit;\n",
       " padding: 3px 10px;\n",
       " height: 70px;\n",
       "}\n",
       ".typeahead-select {\n",
       " background-color: #293547;\n",
       "}\n",
       "body > div.modal.cmd-palette.typeahead-field {\n",
       " display: table;\n",
       " border-collapse: separate;\n",
       " background-color: #2b3850;\n",
       "}\n",
       ".typeahead-container button {\n",
       " font-family: sans-serif;\n",
       " font-size: 28pt;\n",
       " background-color: #252b35;\n",
       " border: none;\n",
       " display: inline-block;\n",
       " line-height: inherit;\n",
       " padding: 3px 10px;\n",
       " height: 70px;\n",
       "}\n",
       ".typeahead-search-icon {\n",
       " min-width: 40px;\n",
       " min-height: 55px;\n",
       " display: block;\n",
       " vertical-align: middle;\n",
       " text-align: center;\n",
       "}\n",
       ".typeahead-container button:focus,\n",
       ".typeahead-container button:hover {\n",
       " color: #dbe1ea;\n",
       " background-color: #21262f;\n",
       " border-color: #293340;\n",
       "}\n",
       ".typeahead-list > li.typeahead-group.active > a,\n",
       ".typeahead-list > li.typeahead-group > a,\n",
       ".typeahead-list > li.typeahead-group > a:focus,\n",
       ".typeahead-list > li.typeahead-group > a:hover {\n",
       " display: none;\n",
       "}\n",
       ".typeahead-dropdown > li > a,\n",
       ".typeahead-list > li > a {\n",
       " color: #a2b0c7;\n",
       " text-decoration: none;\n",
       "}\n",
       ".typeahead-dropdown,\n",
       ".typeahead-list {\n",
       " font-family: sans-serif;\n",
       " font-size: 13pt;\n",
       " color: #a2b0c7;\n",
       " background-color: #202937;\n",
       " border: none;\n",
       " background-clip: padding-box;\n",
       " margin-top: 0px;\n",
       " padding: 3px 2px 3px 0px;\n",
       " line-height: 1.7;\n",
       "}\n",
       ".typeahead-dropdown > li.active > a,\n",
       ".typeahead-dropdown > li > a:focus,\n",
       ".typeahead-dropdown > li > a:hover,\n",
       ".typeahead-list > li.active > a,\n",
       ".typeahead-list > li > a:focus,\n",
       ".typeahead-list > li > a:hover {\n",
       " color: #dbe1ea;\n",
       " background-color: #2b3850;\n",
       " border-color: #2b3850;\n",
       "}\n",
       ".command-shortcut:before {\n",
       " content: \"(command)\";\n",
       " padding-right: 3px;\n",
       " color: #546386;\n",
       "}\n",
       ".edit-shortcut:before {\n",
       " content: \"(edit)\";\n",
       " padding-right: 3px;\n",
       " color: #546386;\n",
       "}\n",
       "ul.typeahead-list i {\n",
       " margin-left: 1px;\n",
       " width: 18px;\n",
       " margin-right: 10px;\n",
       "}\n",
       "ul.typeahead-list {\n",
       " max-height: 50vh;\n",
       " overflow: auto;\n",
       "}\n",
       ".typeahead-list > li {\n",
       " position: relative;\n",
       " border: none;\n",
       "}\n",
       "div.input.typeahead-hint,\n",
       "input.typeahead-hint,\n",
       "body > div.modal.cmd-palette.in > div > div > div > form > div > div.typeahead-field > span.typeahead-query > input.typeahead-hint {\n",
       " color: #546386 !important;\n",
       " background-color: transparent;\n",
       " padding: 3px 10px;\n",
       "}\n",
       ".typeahead-dropdown > li > a,\n",
       ".typeahead-list > li > a {\n",
       " display: block;\n",
       " padding: 5px;\n",
       " clear: both;\n",
       " font-weight: 400;\n",
       " line-height: 1.7;\n",
       " border: 1px solid #202937;\n",
       " border-bottom-color: rgba(75,95,118,.55);\n",
       "}\n",
       "body > div.modal.cmd-palette.in > div {\n",
       " min-width: 750px;\n",
       " margin: 150px auto;\n",
       "}\n",
       ".typeahead-container strong {\n",
       " font-weight: bolder;\n",
       " color: #0b98c8;\n",
       "}\n",
       "#find-and-replace #replace-preview .match,\n",
       "#find-and-replace #replace-preview .insert {\n",
       " color: #ffffff;\n",
       " background-color: #008ebf;\n",
       " border-color: #008ebf;\n",
       " border-style: solid;\n",
       " border-width: 1px;\n",
       " border-radius: 0px;\n",
       "}\n",
       "#find-and-replace #replace-preview .replace .match {\n",
       " background-color: #dc6972;\n",
       " border-color: #dc6972;\n",
       " border-radius: 0px;\n",
       "}\n",
       "#find-and-replace #replace-preview .replace .insert {\n",
       " background-color: #48a667;\n",
       " border-color: #48a667;\n",
       " border-radius: 0px;\n",
       "}\n",
       ".jupyter-dashboard-menu-item.selected::before {\n",
       " font-family: 'FontAwesome' !important;\n",
       " content: '\\f00c' !important;\n",
       " position: absolute !important;\n",
       " color: #0b98c8 !important;\n",
       " left: 0px !important;\n",
       " top: 13px !important;\n",
       " font-size: 12px !important;\n",
       "}\n",
       ".shortcut_key,\n",
       "span.shortcut_key {\n",
       " display: inline-block;\n",
       " width: 16ex;\n",
       " text-align: right;\n",
       " font-family: monospace;\n",
       "}\n",
       ".jupyter-keybindings {\n",
       " padding: 1px;\n",
       " line-height: 24px;\n",
       " border-bottom: 1px solid rgba(75,95,118,.30);\n",
       "}\n",
       ".jupyter-keybindings i {\n",
       " background: #252e3a;\n",
       " font-size: small;\n",
       " padding: 5px;\n",
       " margin-left: 7px;\n",
       "}\n",
       "div#short-key-bindings-intro.well,\n",
       ".well {\n",
       " background-color: #252b35;\n",
       " border: 1px solid #252b35;\n",
       " color: #a2b0c7;\n",
       " border-radius: 2px;\n",
       " -webkit-box-shadow: none;\n",
       " box-shadow: none;\n",
       "}\n",
       "#texteditor-backdrop {\n",
       " background: #1a2028;\n",
       " background-color: #1a2028;\n",
       "}\n",
       "#texteditor-backdrop #texteditor-container .CodeMirror-gutter,\n",
       "#texteditor-backdrop #texteditor-container .CodeMirror-gutters {\n",
       " background: #334050;\n",
       " background-color: #334050;\n",
       " color: #546386;\n",
       "}\n",
       ".edit_app #menubar .navbar {\n",
       " margin-bottom: 0px;\n",
       "}\n",
       "#texteditor-backdrop #texteditor-container {\n",
       " padding: 0px;\n",
       " background-color: #293340;\n",
       " box-shadow: none;\n",
       "}\n",
       ".terminal-app {\n",
       " background: #1a2028;\n",
       "}\n",
       ".terminal-app > #header {\n",
       " background: #1a2028;\n",
       "}\n",
       ".terminal-app .terminal {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 11pt;\n",
       " line-height: 170%;\n",
       " color: #cdd2e9;\n",
       " background: #293340;\n",
       " padding: 0.4em;\n",
       " border-radius: 2px;\n",
       " -webkit-box-shadow: none;\n",
       " box-shadow: none;\n",
       "}\n",
       ".terminal .xterm-viewport {\n",
       " background-color: #293340;\n",
       " color: #cdd2e9;\n",
       " overflow-y: auto;\n",
       "}\n",
       ".terminal .xterm-color-0 {\n",
       " color: #0b98c8;\n",
       "}\n",
       ".terminal .xterm-color-1 {\n",
       " color: #e17e85;\n",
       "}\n",
       ".terminal .xterm-color-2 {\n",
       " color: #4cb2ff;\n",
       "}\n",
       ".terminal .xterm-color-3 {\n",
       " color: #e17e85;\n",
       "}\n",
       ".terminal .xterm-color-4 {\n",
       " color: #51c0ef;\n",
       "}\n",
       ".terminal .xterm-color-5 {\n",
       " color: #61ba86;\n",
       "}\n",
       ".terminal .xterm-color-6 {\n",
       " color: #be86e3;\n",
       "}\n",
       ".terminal .xterm-color-7 {\n",
       " color: #ffec8e;\n",
       "}\n",
       ".terminal .xterm-color-8 {\n",
       " color: #51c0ef;\n",
       "}\n",
       ".terminal .xterm-color-9 {\n",
       " color: #61ba86;\n",
       "}\n",
       ".terminal .xterm-color-10 {\n",
       " color: #e17e85;\n",
       "}\n",
       ".terminal .xterm-color-14 {\n",
       " color: #be86e3;\n",
       "}\n",
       ".terminal .xterm-bg-color-15 {\n",
       " background-color: #293340;\n",
       "}\n",
       ".terminal:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar) .terminal-cursor {\n",
       " background-color: #0b98c8;\n",
       " color: #293340;\n",
       "}\n",
       ".terminal:not(.focus) .terminal-cursor {\n",
       " outline: 1px solid #0b98c8;\n",
       " outline-offset: -1px;\n",
       "}\n",
       ".celltoolbar {\n",
       " font-size: 100%;\n",
       " padding-top: 3px;\n",
       " border-color: transparent;\n",
       " border-bottom: thin solid rgba(0,156,209,.3);\n",
       " background: transparent;\n",
       "}\n",
       ".cell-tag,\n",
       ".tags-input input,\n",
       ".tags-input button {\n",
       " color: #a2b0c7;\n",
       " background-color: #1a2028;\n",
       " background-image: none;\n",
       " border: 1px solid #a2b0c7;\n",
       " border-radius: 1px;\n",
       " box-shadow: none;\n",
       " width: inherit;\n",
       " font-size: inherit;\n",
       " height: 22px;\n",
       " line-height: 22px;\n",
       "}\n",
       "#notebook-container > div.cell.code_cell.rendered.selected > div.input > div.inner_cell > div.ctb_hideshow.ctb_show > div > div > button,\n",
       "#notebook-container > div.input > div.inner_cell > div.ctb_hideshow.ctb_show > div > div > button {\n",
       " font-size: 10pt;\n",
       " color: #a2b0c7;\n",
       " background-color: #1a2028;\n",
       " background-image: none;\n",
       " border: 1px solid #a2b0c7;\n",
       " border-radius: 1px;\n",
       " box-shadow: none;\n",
       " width: inherit;\n",
       " font-size: inherit;\n",
       " height: 22px;\n",
       " line-height: 22px;\n",
       "}\n",
       "div#pager #pager-contents {\n",
       " background: #1a2028 !important;\n",
       " background-color: #1a2028 !important;\n",
       "}\n",
       "div#pager pre {\n",
       " color: #cdd2e9 !important;\n",
       " background: #293340 !important;\n",
       " background-color: #293340 !important;\n",
       " padding: 0.4em;\n",
       "}\n",
       "div#pager .ui-resizable-handle {\n",
       " top: 0px;\n",
       " height: 8px;\n",
       " background: #0b98c8 !important;\n",
       " border-top: 1px solid #0b98c8;\n",
       " border-bottom: 1px solid #0b98c8;\n",
       "}\n",
       "div.CodeMirror,\n",
       "div.CodeMirror pre {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 11pt;\n",
       " line-height: 170%;\n",
       " color: #cdd2e9;\n",
       "}\n",
       "div.CodeMirror-lines {\n",
       " padding-bottom: .9em;\n",
       " padding-left: .5em;\n",
       " padding-right: 1.5em;\n",
       " padding-top: .7em;\n",
       "}\n",
       "span.ansiblack,\n",
       ".ansi-black-fg {\n",
       " color: #2b303b;\n",
       "}\n",
       "span.ansiblue,\n",
       ".ansi-blue-fg,\n",
       ".ansi-blue-intense-fg {\n",
       " color: #61afef;\n",
       "}\n",
       "span.ansigray,\n",
       ".ansi-gray-fg,\n",
       ".ansi-gray-intense-fg {\n",
       " color: #899ab8;\n",
       "}\n",
       "span.ansigreen,\n",
       ".ansi-green-fg {\n",
       " color: #8fca9a;\n",
       "}\n",
       ".ansi-green-intense-fg {\n",
       " color: #899ab8;\n",
       "}\n",
       "span.ansipurple,\n",
       ".ansi-purple-fg,\n",
       ".ansi-purple-intense-fg {\n",
       " color: #b399ef;\n",
       "}\n",
       "span.ansicyan,\n",
       ".ansi-cyan-fg,\n",
       ".ansi-cyan-intense-fg {\n",
       " color: #b399ef;\n",
       "}\n",
       "span.ansiyellow,\n",
       ".ansi-yellow-fg,\n",
       ".ansi-yellow-intense-fg {\n",
       " color: #ffec8e;\n",
       "}\n",
       "span.ansired,\n",
       ".ansi-red-fg,\n",
       ".ansi-red-intense-fg {\n",
       " color: #e07a7a;\n",
       "}\n",
       "div.output-stderr {\n",
       " background-color: #e07a7a;\n",
       "}\n",
       "div.output-stderr pre {\n",
       " color: #d0d4e6;\n",
       "}\n",
       "div.js-error {\n",
       " color: #e07a7a;\n",
       "}\n",
       ".ipython_tooltip {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 11pt;\n",
       " line-height: 170%;\n",
       " border: 2px solid #252c36;\n",
       " background: #363f4e;\n",
       " background-color: #363f4e;\n",
       " border-radius: 2px;\n",
       " overflow-x: visible;\n",
       " overflow-y: visible;\n",
       " box-shadow: none;\n",
       " position: absolute;\n",
       " z-index: 1000;\n",
       "}\n",
       ".ipython_tooltip .tooltiptext pre {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 11pt;\n",
       " line-height: 170%;\n",
       " background: #363f4e;\n",
       " background-color: #363f4e;\n",
       " color: #cdd2e9;\n",
       " overflow-x: visible;\n",
       " overflow-y: visible;\n",
       " max-width: 900px;\n",
       "}\n",
       "div#tooltip.ipython_tooltip {\n",
       " overflow-x: wrap;\n",
       " overflow-y: visible;\n",
       " max-width: 800px;\n",
       "}\n",
       "div.tooltiptext.bigtooltip {\n",
       " overflow-x: visible;\n",
       " overflow-y: scroll;\n",
       " height: 400px;\n",
       " max-width: 800px;\n",
       "}\n",
       ".cm-s-ipython.CodeMirror {\n",
       " font-family: monospace, monospace;\n",
       " font-size: 11pt;\n",
       " background: #293340;\n",
       " color: #cdd2e9;\n",
       " border-radius: 2px;\n",
       " font-style: normal;\n",
       " font-weight: normal;\n",
       "}\n",
       ".cm-s-ipython div.CodeMirror-selected {\n",
       " background: #334050;\n",
       "}\n",
       ".CodeMirror-gutters {\n",
       " border: none;\n",
       " border-right: 1px solid #334050 !important;\n",
       " background-color: #334050 !important;\n",
       " background: #334050 !important;\n",
       " border-radius: 0px;\n",
       " white-space: nowrap;\n",
       "}\n",
       ".cm-s-ipython .CodeMirror-gutters {\n",
       " background: #334050;\n",
       " border: none;\n",
       " border-radius: 0px;\n",
       " width: 36px;\n",
       "}\n",
       ".cm-s-ipython .CodeMirror-linenumber {\n",
       " color: #546386;\n",
       "}\n",
       ".CodeMirror-sizer {\n",
       " margin-left: 40px;\n",
       "}\n",
       ".CodeMirror-linenumber,\n",
       "div.CodeMirror-linenumber,\n",
       ".CodeMirror-gutter.CodeMirror-linenumberdiv.CodeMirror-gutter.CodeMirror-linenumber {\n",
       " padding-right: 1px;\n",
       " margin-left: 0px;\n",
       " margin: 0px;\n",
       " width: 26px !important;\n",
       " padding: 0px;\n",
       " text-align: right;\n",
       "}\n",
       ".CodeMirror-linenumber {\n",
       " color: #546386;\n",
       "}\n",
       ".cm-s-ipython .CodeMirror-cursor {\n",
       " border-left: 2px solid #0095ff !important;\n",
       "}\n",
       ".cm-s-ipython span.cm-comment {\n",
       " color: #667fb1;\n",
       " font-style: italic;\n",
       "}\n",
       ".cm-s-ipython span.cm-atom {\n",
       " color: #be86e3;\n",
       "}\n",
       ".cm-s-ipython span.cm-number {\n",
       " color: #51c0ef;\n",
       "}\n",
       ".cm-s-ipython span.cm-property {\n",
       " color: #cdd2e9;\n",
       "}\n",
       ".cm-s-ipython span.cm-attribute {\n",
       " color: #cdd2e9;\n",
       "}\n",
       ".cm-s-ipython span.cm-keyword {\n",
       " color: #4cb2ff;\n",
       " font-weight: normal;\n",
       "}\n",
       ".cm-s-ipython span.cm-string {\n",
       " color: #61ba86;\n",
       "}\n",
       ".cm-s-ipython span.cm-meta {\n",
       " color: #ffec8e;\n",
       "}\n",
       ".cm-s-ipython span.cm-operator {\n",
       " color: #00b4ff;\n",
       "}\n",
       ".cm-s-ipython span.cm-builtin {\n",
       " color: #e17e85;\n",
       "}\n",
       ".cm-s-ipython span.cm-variable {\n",
       " color: #cdd2e9;\n",
       "}\n",
       ".cm-s-ipython span.cm-variable-2 {\n",
       " color: #e17e85;\n",
       "}\n",
       ".cm-s-ipython span.cm-variable-3 {\n",
       " color: #ffec8e;\n",
       "}\n",
       ".cm-s-ipython span.cm-def {\n",
       " color: #ffec8e;\n",
       " font-weight: normal;\n",
       "}\n",
       ".cm-s-ipython span.cm-error {\n",
       " background: rgba(191,97,106,.4);\n",
       "}\n",
       ".cm-s-ipython span.cm-tag {\n",
       " color: #be86e3;\n",
       "}\n",
       ".cm-s-ipython span.cm-link {\n",
       " color: #51c0ef;\n",
       "}\n",
       ".cm-s-ipython span.cm-storage {\n",
       " color: #be86e3;\n",
       "}\n",
       ".cm-s-ipython span.cm-entity {\n",
       " color: #be86e3;\n",
       "}\n",
       ".cm-s-ipython span.cm-quote {\n",
       " color: #61ba86;\n",
       "}\n",
       "div.CodeMirror span.CodeMirror-matchingbracket {\n",
       " color: #ffffff;\n",
       " font-weight: bold;\n",
       " background-color: #4c8be2;\n",
       "}\n",
       "div.CodeMirror span.CodeMirror-nonmatchingbracket {\n",
       " color: #ffffff;\n",
       " font-weight: bold;\n",
       " background: rgba(191,97,106,.4) !important;\n",
       "}\n",
       ".cm-header-1 {\n",
       " font-size: 215%;\n",
       "}\n",
       ".cm-header-2 {\n",
       " font-size: 180%;\n",
       "}\n",
       ".cm-header-3 {\n",
       " font-size: 150%;\n",
       "}\n",
       ".cm-header-4 {\n",
       " font-size: 120%;\n",
       "}\n",
       ".cm-header-5 {\n",
       " font-size: 100%;\n",
       "}\n",
       ".cm-s-default .cm-hr {\n",
       " color: #00b4ff;\n",
       "}\n",
       "div.cell.text_cell .cm-s-default .cm-header {\n",
       " font-family: sans-serif;\n",
       " font-weight: normal;\n",
       " color: #0b98c8 !important;\n",
       " margin-top: 0.3em !important;\n",
       " margin-bottom: 0.3em !important;\n",
       "}\n",
       "div.cell.text_cell .cm-s-default span.cm-variable-2 {\n",
       " color: #b0bdd7 !important;\n",
       "}\n",
       "div.cell.text_cell .cm-s-default span.cm-variable-3 {\n",
       " color: #ffec8e !important;\n",
       "}\n",
       ".cm-s-default span.cm-comment {\n",
       " color: #667fb1 !important;\n",
       "}\n",
       ".cm-s-default .cm-tag {\n",
       " color: #8fb36a;\n",
       "}\n",
       ".cm-s-default .cm-builtin {\n",
       " color: #e17e85;\n",
       "}\n",
       ".cm-s-default .cm-string {\n",
       " color: #61ba86;\n",
       "}\n",
       ".cm-s-default .cm-keyword {\n",
       " color: #4cb2ff;\n",
       "}\n",
       ".cm-s-default .cm-number {\n",
       " color: #51c0ef;\n",
       "}\n",
       ".cm-s-default .cm-error {\n",
       " color: #be86e3;\n",
       "}\n",
       ".cm-s-default .cm-link {\n",
       " color: #51c0ef;\n",
       "}\n",
       ".cm-s-default .cm-atom {\n",
       " color: #51c0ef;\n",
       "}\n",
       ".cm-s-default .cm-def {\n",
       " color: #ffec8e;\n",
       "}\n",
       ".CodeMirror-cursor {\n",
       " border-left: 2px solid #0095ff !important;\n",
       " border-right: none;\n",
       " width: 0;\n",
       "}\n",
       ".cm-s-default div.CodeMirror-selected {\n",
       " background: #334050;\n",
       "}\n",
       ".cm-s-default .cm-selected {\n",
       " background: #334050;\n",
       "}\n",
       ".MathJax_Display,\n",
       ".MathJax {\n",
       " border: 0 !important;\n",
       " font-size: 100% !important;\n",
       " text-align: center !important;\n",
       " margin: 0em !important;\n",
       " line-height: 2.25 !important;\n",
       "}\n",
       ".MathJax:focus,\n",
       "body :focus .MathJax {\n",
       " display: inline-block !important;\n",
       "}\n",
       ".MathJax:focus,\n",
       "body :focus .MathJax {\n",
       " display: inline-block !important;\n",
       "}\n",
       ".completions {\n",
       " position: absolute;\n",
       " z-index: 110;\n",
       " overflow: hidden;\n",
       " border: medium solid rgba(0,156,209,.5);\n",
       " box-shadow: none;\n",
       " line-height: 1;\n",
       "}\n",
       ".completions select {\n",
       " background: #293340;\n",
       " background-color: #293340;\n",
       " outline: none;\n",
       " border: none;\n",
       " padding: 0px;\n",
       " margin: 0px;\n",
       " margin-left: 2px;\n",
       " overflow: auto;\n",
       " font-family: monospace, monospace;\n",
       " font-size: 11pt;\n",
       " color: #cdd2e9;\n",
       " width: auto;\n",
       "}\n",
       "div#maintoolbar {\n",
       " display: none !important;\n",
       "}\n",
       "#header-container {\n",
       " display: none !important;\n",
       "}\n",
       "\n",
       "<script>\n",
       "    MathJax.Hub.Config({\n",
       "        \"HTML-CSS\": {\n",
       "            /*preferredFont: \"TeX\",*/\n",
       "            /*availableFonts: [\"TeX\", \"STIX\"],*/\n",
       "            styles: {\n",
       "                scale: 100,\n",
       "                \".MathJax_Display\": {\n",
       "                    \"font-size\": \"100%\",\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "     </style>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from jupyterthemes.stylefx import set_nb_theme\n",
    "set_nb_theme('chesterish')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "8c2a24cb",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "os.environ[\"CUDA_DEVICE_ORDER\"]=\"PCI_BUS_ID\"\n",
    "os.environ[\"CUDA_VISIBLE_DEVICES\"]=\"0\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "f45eb6b0",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/mrbean/.conda/envs/whisper_lightning/lib/python3.10/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
      "  from .autonotebook import tqdm as notebook_tqdm\n",
      "2023-02-21 15:40:52.888700: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA\n",
      "To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
      "2023-02-21 15:40:53.473104: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory\n",
      "2023-02-21 15:40:53.473149: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory\n",
      "2023-02-21 15:40:53.473154: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import torch\n",
    "\n",
    "import datasets \n",
    "\n",
    "from datasets import load_dataset, load_metric\n",
    "\n",
    "from transformers import (\n",
    "    AutoModel,\n",
    "    AutoModelForMaskedLM,\n",
    "    AutoModelForSeq2SeqLM,\n",
    "    AutoModelForTokenClassification,\n",
    "    AutoTokenizer,\n",
    "    DataCollatorForSeq2Seq,\n",
    "    pipeline,\n",
    "    Seq2SeqTrainingArguments,\n",
    "    Seq2SeqTrainer,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "7fc4eb40",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/mrbean/.conda/envs/whisper_lightning/lib/python3.10/site-packages/transformers/models/t5/tokenization_t5_fast.py:155: FutureWarning: This tokenizer was incorrectly instantiated with a model max length of 512 which will be corrected in Transformers v5.\n",
      "For now, this behavior is kept to avoid breaking backwards compatibility when padding/encoding with `truncation is True`.\n",
      "- Be aware that you SHOULD NOT rely on t5-small automatically truncating your input to 512 when padding/encoding.\n",
      "- If you want to encode/pad to sequences longer than 512 you can either instantiate this tokenizer with `model_max_length` or pass `max_length` when encoding/padding.\n",
      "- To avoid this warning, please instantiate this tokenizer with `model_max_length` set to your preferred value.\n",
      "  warnings.warn(\n"
     ]
    }
   ],
   "source": [
    "# Load the pre-trained model and tokenizer\n",
    "model_name = \"t5-small\"\n",
    "tokenizer = AutoTokenizer.from_pretrained(model_name)\n",
    "model = AutoModelForSeq2SeqLM.from_pretrained(model_name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "363045f5",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Found cached dataset cnn_dailymail (/home/mrbean/.cache/huggingface/datasets/cnn_dailymail/3.0.0/3.0.0/1b3c71476f6d152c31c1730e83ccb08bcf23e348233f4fcc11e182248e6bf7de)\n",
      "Found cached dataset cnn_dailymail (/home/mrbean/.cache/huggingface/datasets/cnn_dailymail/3.0.0/3.0.0/1b3c71476f6d152c31c1730e83ccb08bcf23e348233f4fcc11e182248e6bf7de)\n",
      "100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1122/1122 [02:06<00:00,  8.88ba/s]\n",
      "Loading cached processed dataset at /home/mrbean/.cache/huggingface/datasets/cnn_dailymail/3.0.0/3.0.0/1b3c71476f6d152c31c1730e83ccb08bcf23e348233f4fcc11e182248e6bf7de/cache-2d3b7edd75fb1188.arrow\n"
     ]
    }
   ],
   "source": [
    "def preprocess_function(batch):\n",
    "    inputs = tokenizer(batch[\"article\"], padding=\"max_length\", truncation=True, max_length=512)\n",
    "    outputs = tokenizer(batch[\"highlights\"], padding=\"max_length\", truncation=True, max_length=128)\n",
    "    batch[\"input_ids\"] = inputs.input_ids\n",
    "    batch[\"attention_mask\"] = inputs.attention_mask\n",
    "    batch[\"labels\"] = outputs.input_ids.copy()\n",
    "    return batch\n",
    "\n",
    "# Load the dataset\n",
    "train_data = load_dataset(\"cnn_dailymail\", \"3.0.0\", split=\"train\")\n",
    "val_data = load_dataset(\"cnn_dailymail\", \"3.0.0\", split=\"validation[:10%]\")\n",
    "\n",
    "train_ds = train_data.map(\n",
    "    preprocess_function, \n",
    "    batched=True, \n",
    "    batch_size=256, \n",
    "    remove_columns=[\"article\", \"highlights\", \"id\"]\n",
    ")\n",
    "\n",
    "val_ds = val_data.map(\n",
    "    preprocess_function, \n",
    "    batched=True, \n",
    "    batch_size=256, \n",
    "    remove_columns=[\"article\", \"highlights\", \"id\"]\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "6faa8c86",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/tmp/ipykernel_478601/1088570042.py:23: FutureWarning: load_metric is deprecated and will be removed in the next major version of datasets. Use 'evaluate.load' instead, from the new library 🤗 Evaluate: https://huggingface.co/docs/evaluate\n",
      "  metric = load_metric(\"rouge\")\n",
      "max_steps is given, it will override any value given in num_train_epochs\n",
      "Using cuda_amp half precision backend\n",
      "The following columns in the training set don't have a corresponding argument in `T5ForConditionalGeneration.forward` and have been ignored: id, article, highlights. If id, article, highlights are not expected by `T5ForConditionalGeneration.forward`,  you can safely ignore this message.\n",
      "/home/mrbean/.conda/envs/whisper_lightning/lib/python3.10/site-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning\n",
      "  warnings.warn(\n",
      "***** Running training *****\n",
      "  Num examples = 0\n",
      "  Num Epochs = 1\n",
      "  Instantaneous batch size per device = 16\n",
      "  Total train batch size (w. parallel, distributed & accumulation) = 16\n",
      "  Gradient Accumulation steps = 1\n",
      "  Total optimization steps = 5000\n",
      "  Number of trainable parameters = 60506624\n"
     ]
    },
    {
     "ename": "IndexError",
     "evalue": "Invalid key: 90427 is out of bounds for size 0",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mIndexError\u001b[0m                                Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[6], line 47\u001b[0m\n\u001b[1;32m     36\u001b[0m trainer \u001b[38;5;241m=\u001b[39m Seq2SeqTrainer(\n\u001b[1;32m     37\u001b[0m     model\u001b[38;5;241m=\u001b[39mmodel,\n\u001b[1;32m     38\u001b[0m     args\u001b[38;5;241m=\u001b[39mtraining_args,\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m     43\u001b[0m     compute_metrics\u001b[38;5;241m=\u001b[39mcompute_metrics,\n\u001b[1;32m     44\u001b[0m )\n\u001b[1;32m     46\u001b[0m \u001b[38;5;66;03m# Start the training\u001b[39;00m\n\u001b[0;32m---> 47\u001b[0m \u001b[43mtrainer\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtrain\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/.conda/envs/whisper_lightning/lib/python3.10/site-packages/transformers/trainer.py:1539\u001b[0m, in \u001b[0;36mTrainer.train\u001b[0;34m(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs)\u001b[0m\n\u001b[1;32m   1534\u001b[0m     \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmodel_wrapped \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmodel\n\u001b[1;32m   1536\u001b[0m inner_training_loop \u001b[38;5;241m=\u001b[39m find_executable_batch_size(\n\u001b[1;32m   1537\u001b[0m     \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_inner_training_loop, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_train_batch_size, args\u001b[38;5;241m.\u001b[39mauto_find_batch_size\n\u001b[1;32m   1538\u001b[0m )\n\u001b[0;32m-> 1539\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43minner_training_loop\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m   1540\u001b[0m \u001b[43m    \u001b[49m\u001b[43margs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1541\u001b[0m \u001b[43m    \u001b[49m\u001b[43mresume_from_checkpoint\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mresume_from_checkpoint\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1542\u001b[0m \u001b[43m    \u001b[49m\u001b[43mtrial\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtrial\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1543\u001b[0m \u001b[43m    \u001b[49m\u001b[43mignore_keys_for_eval\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mignore_keys_for_eval\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1544\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/.conda/envs/whisper_lightning/lib/python3.10/site-packages/transformers/trainer.py:1761\u001b[0m, in \u001b[0;36mTrainer._inner_training_loop\u001b[0;34m(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval)\u001b[0m\n\u001b[1;32m   1758\u001b[0m     \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_load_rng_state(resume_from_checkpoint)\n\u001b[1;32m   1760\u001b[0m step \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m\n\u001b[0;32m-> 1761\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m step, inputs \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28menumerate\u001b[39m(epoch_iterator):\n\u001b[1;32m   1762\u001b[0m \n\u001b[1;32m   1763\u001b[0m     \u001b[38;5;66;03m# Skip past any already trained steps if resuming training\u001b[39;00m\n\u001b[1;32m   1764\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m steps_trained_in_current_epoch \u001b[38;5;241m>\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[1;32m   1765\u001b[0m         steps_trained_in_current_epoch \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n",
      "File \u001b[0;32m~/.conda/envs/whisper_lightning/lib/python3.10/site-packages/torch/utils/data/dataloader.py:628\u001b[0m, in \u001b[0;36m_BaseDataLoaderIter.__next__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    625\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_sampler_iter \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m    626\u001b[0m     \u001b[38;5;66;03m# TODO(https://github.com/pytorch/pytorch/issues/76750)\u001b[39;00m\n\u001b[1;32m    627\u001b[0m     \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_reset()  \u001b[38;5;66;03m# type: ignore[call-arg]\u001b[39;00m\n\u001b[0;32m--> 628\u001b[0m data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_next_data\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    629\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_num_yielded \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[1;32m    630\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_dataset_kind \u001b[38;5;241m==\u001b[39m _DatasetKind\u001b[38;5;241m.\u001b[39mIterable \u001b[38;5;129;01mand\u001b[39;00m \\\n\u001b[1;32m    631\u001b[0m         \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_IterableDataset_len_called \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m \\\n\u001b[1;32m    632\u001b[0m         \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_num_yielded \u001b[38;5;241m>\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_IterableDataset_len_called:\n",
      "File \u001b[0;32m~/.conda/envs/whisper_lightning/lib/python3.10/site-packages/torch/utils/data/dataloader.py:671\u001b[0m, in \u001b[0;36m_SingleProcessDataLoaderIter._next_data\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    669\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_next_data\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[1;32m    670\u001b[0m     index \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_next_index()  \u001b[38;5;66;03m# may raise StopIteration\u001b[39;00m\n\u001b[0;32m--> 671\u001b[0m     data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_dataset_fetcher\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfetch\u001b[49m\u001b[43m(\u001b[49m\u001b[43mindex\u001b[49m\u001b[43m)\u001b[49m  \u001b[38;5;66;03m# may raise StopIteration\u001b[39;00m\n\u001b[1;32m    672\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_pin_memory:\n\u001b[1;32m    673\u001b[0m         data \u001b[38;5;241m=\u001b[39m _utils\u001b[38;5;241m.\u001b[39mpin_memory\u001b[38;5;241m.\u001b[39mpin_memory(data, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_pin_memory_device)\n",
      "File \u001b[0;32m~/.conda/envs/whisper_lightning/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:58\u001b[0m, in \u001b[0;36m_MapDatasetFetcher.fetch\u001b[0;34m(self, possibly_batched_index)\u001b[0m\n\u001b[1;32m     56\u001b[0m         data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdataset\u001b[38;5;241m.\u001b[39m__getitems__(possibly_batched_index)\n\u001b[1;32m     57\u001b[0m     \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m---> 58\u001b[0m         data \u001b[38;5;241m=\u001b[39m [\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdataset[idx] \u001b[38;5;28;01mfor\u001b[39;00m idx \u001b[38;5;129;01min\u001b[39;00m possibly_batched_index]\n\u001b[1;32m     59\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m     60\u001b[0m     data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdataset[possibly_batched_index]\n",
      "File \u001b[0;32m~/.conda/envs/whisper_lightning/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:58\u001b[0m, in \u001b[0;36m<listcomp>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m     56\u001b[0m         data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdataset\u001b[38;5;241m.\u001b[39m__getitems__(possibly_batched_index)\n\u001b[1;32m     57\u001b[0m     \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m---> 58\u001b[0m         data \u001b[38;5;241m=\u001b[39m [\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdataset\u001b[49m\u001b[43m[\u001b[49m\u001b[43midx\u001b[49m\u001b[43m]\u001b[49m \u001b[38;5;28;01mfor\u001b[39;00m idx \u001b[38;5;129;01min\u001b[39;00m possibly_batched_index]\n\u001b[1;32m     59\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m     60\u001b[0m     data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdataset[possibly_batched_index]\n",
      "File \u001b[0;32m~/.conda/envs/whisper_lightning/lib/python3.10/site-packages/datasets/arrow_dataset.py:2601\u001b[0m, in \u001b[0;36mDataset.__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m   2599\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m__getitem__\u001b[39m(\u001b[38;5;28mself\u001b[39m, key):  \u001b[38;5;66;03m# noqa: F811\u001b[39;00m\n\u001b[1;32m   2600\u001b[0m \u001b[38;5;250m    \u001b[39m\u001b[38;5;124;03m\"\"\"Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).\"\"\"\u001b[39;00m\n\u001b[0;32m-> 2601\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_getitem\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m   2602\u001b[0m \u001b[43m        \u001b[49m\u001b[43mkey\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   2603\u001b[0m \u001b[43m    \u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/.conda/envs/whisper_lightning/lib/python3.10/site-packages/datasets/arrow_dataset.py:2585\u001b[0m, in \u001b[0;36mDataset._getitem\u001b[0;34m(self, key, **kwargs)\u001b[0m\n\u001b[1;32m   2583\u001b[0m format_kwargs \u001b[38;5;241m=\u001b[39m format_kwargs \u001b[38;5;28;01mif\u001b[39;00m format_kwargs \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m {}\n\u001b[1;32m   2584\u001b[0m formatter \u001b[38;5;241m=\u001b[39m get_formatter(format_type, features\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfeatures, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mformat_kwargs)\n\u001b[0;32m-> 2585\u001b[0m pa_subtable \u001b[38;5;241m=\u001b[39m \u001b[43mquery_table\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_data\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkey\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mindices\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_indices\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mif\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_indices\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mis\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mnot\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43;01melse\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m   2586\u001b[0m formatted_output \u001b[38;5;241m=\u001b[39m format_table(\n\u001b[1;32m   2587\u001b[0m     pa_subtable, key, formatter\u001b[38;5;241m=\u001b[39mformatter, format_columns\u001b[38;5;241m=\u001b[39mformat_columns, output_all_columns\u001b[38;5;241m=\u001b[39moutput_all_columns\n\u001b[1;32m   2588\u001b[0m )\n\u001b[1;32m   2589\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m formatted_output\n",
      "File \u001b[0;32m~/.conda/envs/whisper_lightning/lib/python3.10/site-packages/datasets/formatting/formatting.py:588\u001b[0m, in \u001b[0;36mquery_table\u001b[0;34m(table, key, indices)\u001b[0m\n\u001b[1;32m    586\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m    587\u001b[0m     size \u001b[38;5;241m=\u001b[39m indices\u001b[38;5;241m.\u001b[39mnum_rows \u001b[38;5;28;01mif\u001b[39;00m indices \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m table\u001b[38;5;241m.\u001b[39mnum_rows\n\u001b[0;32m--> 588\u001b[0m     \u001b[43m_check_valid_index_key\u001b[49m\u001b[43m(\u001b[49m\u001b[43mkey\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msize\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    589\u001b[0m \u001b[38;5;66;03m# Query the main table\u001b[39;00m\n\u001b[1;32m    590\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m indices \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n",
      "File \u001b[0;32m~/.conda/envs/whisper_lightning/lib/python3.10/site-packages/datasets/formatting/formatting.py:531\u001b[0m, in \u001b[0;36m_check_valid_index_key\u001b[0;34m(key, size)\u001b[0m\n\u001b[1;32m    529\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(key, \u001b[38;5;28mint\u001b[39m):\n\u001b[1;32m    530\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m (key \u001b[38;5;241m<\u001b[39m \u001b[38;5;241m0\u001b[39m \u001b[38;5;129;01mand\u001b[39;00m key \u001b[38;5;241m+\u001b[39m size \u001b[38;5;241m<\u001b[39m \u001b[38;5;241m0\u001b[39m) \u001b[38;5;129;01mor\u001b[39;00m (key \u001b[38;5;241m>\u001b[39m\u001b[38;5;241m=\u001b[39m size):\n\u001b[0;32m--> 531\u001b[0m         \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mIndexError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mInvalid key: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mkey\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m is out of bounds for size \u001b[39m\u001b[38;5;132;01m{\u001b[39;00msize\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m    532\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m\n\u001b[1;32m    533\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(key, \u001b[38;5;28mslice\u001b[39m):\n",
      "\u001b[0;31mIndexError\u001b[0m: Invalid key: 90427 is out of bounds for size 0"
     ]
    }
   ],
   "source": [
    "class MyLightningModule(pl.LightningModule):\n",
    "    def __init__(self, model_name, learning_rate, weight_decay, batch_size, num_training_steps):\n",
    "        super().__init__()\n",
    "        self.model_name = model_name\n",
    "        self.learning_rate = learning_rate\n",
    "        self.weight_decay = weight_decay\n",
    "        self.batch_size = batch_size\n",
    "        self.num_training_steps = num_training_steps\n",
    "        \n",
    "        # Load the pre-trained model and tokenizer\n",
    "        self.tokenizer = AutoTokenizer.from_pretrained(self.model_name)\n",
    "        self.model = AutoModelForSeq2SeqLM.from_pretrained(self.model_name)\n",
    "\n",
    "    def forward(self, input_ids, attention_mask, labels=None):\n",
    "        output = self.model(\n",
    "            input_ids=input_ids,\n",
    "            attention_mask=attention_mask,\n",
    "            labels=labels,\n",
    "        )\n",
    "        return output.loss, output.logits\n",
    "    \n",
    "    def training_step(self, batch, batch_idx):\n",
    "        input_ids = batch[\"input_ids\"]\n",
    "        attention_mask = batch[\"attention_mask\"]\n",
    "        labels = batch[\"labels\"]\n",
    "        \n",
    "        loss\n",
    "\n",
    "# Define the data collator\n",
    "data_collator = DataCollatorForSeq2Seq(tokenizer, model=model)\n",
    "\n",
    "# Initialize the trainer arguments\n",
    "training_args = Seq2SeqTrainingArguments(\n",
    "    output_dir=\"./results\",\n",
    "    learning_rate=1e-5,\n",
    "    per_device_train_batch_size=16,\n",
    "    per_device_eval_batch_size=16,\n",
    "    max_steps=5000,\n",
    "    weight_decay=1e-4,\n",
    "    push_to_hub=False,\n",
    "    evaluation_strategy = \"steps\",\n",
    "    eval_steps = 50,\n",
    "    generation_max_length=128,\n",
    "    predict_with_generate=True,\n",
    "    logging_steps=100,\n",
    "    gradient_accumulation_steps=1,\n",
    "    fp16=True,\n",
    ")\n",
    "\n",
    "# Load the ROUGE metric\n",
    "metric = load_metric(\"rouge\")\n",
    "\n",
    "# Define the evaluation function\n",
    "def compute_metrics(pred):\n",
    "    labels = pred.label_ids\n",
    "    preds = pred.predictions\n",
    "    decoded_preds = tokenizer.batch_decode(preds, skip_special_tokens=True)\n",
    "    decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True)\n",
    "    scores = metric.compute(predictions=decoded_preds, references=decoded_labels, rouge_types=[\"rouge1\"])[\"rouge1\"].mid\n",
    "    return {\"rouge1_precision\": scores.precision, \"rouge1_recall\": scores.recall, \"rouge1_fmeasure\": scores.fmeasure}\n",
    "\n",
    "\n",
    "# Initialize the trainer\n",
    "trainer = Seq2SeqTrainer(\n",
    "    model=model,\n",
    "    args=training_args,\n",
    "    train_dataset=train_data,\n",
    "    eval_dataset=val_data,\n",
    "    data_collator=data_collator,\n",
    "    tokenizer=tokenizer,\n",
    "    compute_metrics=compute_metrics,\n",
    ")\n",
    "\n",
    "# Start the training\n",
    "trainer.train()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1b0f9a76",
   "metadata": {},
   "source": [
    "# Steps:\n",
    "1. Rewrite code to be more general\n",
    "\n",
    "a) Data loading should be from disk rather than their load_dataset, and should be on the fly\n",
    "\n",
    "b) Rewrite to Lightning code, Trainer etc using Lightning, compute metric fine that we use huggingface"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ff03c8bb",
   "metadata": {},
   "outputs": [],
   "source": [
    "!nvidia-smi"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "aafc4b27",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
